Skip to content

Commit

Permalink
gracefull fallback for TrustedFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Jan 8, 2021
1 parent 44c9b4b commit ed6c343
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/workbench/api/worker/extHostExtensionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ namespace TrustedFunction {
});

export function create(...args: string[]): Function {
return self.eval(ttpTrustedFunction?.createScript('', ...args) as unknown as string);
if (!ttpTrustedFunction) {
return new Function(...args);
}
return self.eval(ttpTrustedFunction.createScript('', ...args) as unknown as string);
}
}

Expand Down

0 comments on commit ed6c343

Please sign in to comment.