mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
gracefull fallback for TrustedFunction
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user