Skip to content

Commit

Permalink
chore: fix window access
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Aug 2, 2024
1 parent da0c8eb commit 1dbec32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/runtime-dom/src/nodeOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import type {
let policy: Pick<TrustedTypePolicy, 'name' | 'createHTML'> | undefined =
undefined

const tt = (window as unknown as TrustedTypesWindow).trustedTypes
const tt =
typeof window !== 'undefined' &&
(window as unknown as TrustedTypesWindow).trustedTypes

if (tt) {
try {
policy = /*#__PURE__*/ tt.createPolicy('vue', {
Expand Down

0 comments on commit 1dbec32

Please sign in to comment.