File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import { mainWindow } from 'vs/base/browser/window' ;
7
6
import { onUnexpectedError } from 'vs/base/common/errors' ;
8
7
9
8
export function createTrustedTypesPolicy < Options extends TrustedTypePolicyOptions > (
@@ -28,7 +27,7 @@ export function createTrustedTypesPolicy<Options extends TrustedTypePolicyOption
28
27
}
29
28
}
30
29
try {
31
- return mainWindow . trustedTypes ?. createPolicy ( policyName , policyOptions ) ;
30
+ return ( globalThis as any ) . trustedTypes ?. createPolicy ( policyName , policyOptions ) ;
32
31
} catch ( err ) {
33
32
onUnexpectedError ( err ) ;
34
33
return undefined ;
You can’t perform that action at this time.
0 commit comments