Skip to content

Commit c57cf1c

Browse files
committed
Add typeof string guard
1 parent 2f3bb5e commit c57cf1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/debug/validatePreDebug.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export async function preDebugValidate(actionContext: IActionContext, debugConfi
4444

4545
// If one of the `preLaunchTasks` already handles starting emulators, assume the user is already on top of automating this part of the setup
4646
const preLaunchTaskName: string | undefined = debugConfig.preLaunchTask;
47-
const preLaunchTaskChain: string[] = preLaunchTaskName ? getPreLaunchTaskChain(getTasks(workspace), preLaunchTaskName) : [];
47+
const preLaunchTaskChain: string[] = typeof preLaunchTaskName === 'string' ? getPreLaunchTaskChain(getTasks(workspace), preLaunchTaskName) : [];
4848
const hasEmulatorTask: boolean = preLaunchTaskChain.some(label => emulatorTaskRegExp.test(label));
4949
const forceEmulatorValidation: boolean = !!getWorkspaceSetting<boolean>('forceEmulatorValidation');
5050
const skipEmulatorValidation: boolean = hasEmulatorTask && !forceEmulatorValidation;

0 commit comments

Comments
 (0)