Skip to content

Commit 1f1be83

Browse files
Simplify HMR disable flag detection
Agent-Logs-Url: https://github.com/NativeScript/nativescript-cli/sessions/58c98aaf-7d9e-410b-b92b-0708f4ff4655 Co-authored-by: NathanWalker <457187+NathanWalker@users.noreply.github.com>
1 parent 1ab991c commit 1f1be83

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

lib/options.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,13 @@ export class Options {
389389
}
390390

391391
private isHmrExplicitlyDisabled(): boolean {
392-
return hideBin(process.argv).some((arg) => {
393-
if (arg !== "--no-hmr" && arg !== "--noHmr") {
394-
return (
395-
arg === "--no-hmr=true" ||
396-
arg === "--noHmr=true"
397-
);
398-
}
399-
400-
return true;
401-
});
392+
return hideBin(process.argv).some(
393+
(arg) =>
394+
arg === "--no-hmr" ||
395+
arg === "--noHmr" ||
396+
arg === "--no-hmr=true" ||
397+
arg === "--noHmr=true"
398+
);
402399
}
403400

404401
private isTruthyBooleanValue(value: unknown): boolean {

0 commit comments

Comments
 (0)