Skip to content

Commit cb4676c

Browse files
committed
Fix envStr possibly undefined in InstallCommandBlock
1 parent c0830a4 commit cb4676c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/app/_components/InstallCommandBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ function HighlightedCommand({ command }: { command: string }) {
568568
/* Strip leading env var tokens: mode=xxx or var_xxx="yyy" */
569569
const envRe = /^((?:(?:mode=\S+|var_\w+="[^"]*")\s+)+)/;
570570
const envMatch = rest.match(envRe);
571-
if (envMatch) {
571+
if (envMatch?.[1]) {
572572
const envStr = envMatch[1];
573573
rest = rest.slice(envStr.length);
574574
const tokens = envStr.trim().split(/\s+/);

0 commit comments

Comments
 (0)