Skip to content

Commit

Permalink
remove required
Browse files Browse the repository at this point in the history
  • Loading branch information
alextaing committed Oct 31, 2023
1 parent 6142582 commit 5c94071
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/studio-plugin/src/types/CliArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export interface CliArgs {
// This option is always provided by the cac package, and we only use it to
// configure Studio to run in React Strict Mode for internal development by
// using `-- strict`.
"--": string[];
"--"?: string[];
}
4 changes: 2 additions & 2 deletions packages/studio/bin/studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cli
.option("--port <port>", "[number] port to run studio")
.option("--root <directory>", `[string] path to the root directory`)
.action((options: CliArgs) => {
const useStrictMode = options["--"].includes("strict");
const useStrictMode = options["--"]?.includes("strict");
spawnSync(
"npx",
[
Expand All @@ -33,7 +33,7 @@ cli
env: {
...process.env,
YEXT_STUDIO_ARGS: JSON.stringify(options),
VITE_STUDIO_STRICT: String(useStrictMode),
VITE_STUDIO_STRICT: String(useStrictMode ?? false),
},
shell: true,
}
Expand Down

0 comments on commit 5c94071

Please sign in to comment.