File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ interface CSPTrustedTypesPolicy {
13
13
createHTML : ( s : string , response : Response ) => CSPTrustedHTMLToStringable
14
14
}
15
15
let cspTrustedTypesPolicyPromise : Promise < CSPTrustedTypesPolicy > | null = null
16
- export function setCSPTrustedTypesPolicy ( policy : CSPTrustedTypesPolicy | Promise < CSPTrustedTypesPolicy > ) : void {
17
- cspTrustedTypesPolicyPromise = Promise . resolve ( policy )
16
+ // Passing `null` clears the policy.
17
+ export function setCSPTrustedTypesPolicy ( policy : CSPTrustedTypesPolicy | Promise < CSPTrustedTypesPolicy > | null ) : void {
18
+ cspTrustedTypesPolicyPromise = policy === null ? policy : Promise . resolve ( policy )
18
19
}
19
20
20
21
export default class IncludeFragmentElement extends HTMLElement {
You can’t perform that action at this time.
0 commit comments