Skip to content

Commit 867bc71

Browse files
authored
Apply suggestions from code review
1 parent c374dd9 commit 867bc71

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/svelte/src/internal/client/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const STALE_REACTION = new (class StaleReactionError extends Error {
6868
})();
6969

7070
export const IS_XHTML =
71+
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
7172
!!globalThis.document?.contentType &&
7273
/* @__PURE__ */ globalThis.document.contentType.includes('xml');
7374
export const ELEMENT_NODE = 1;

packages/svelte/src/internal/client/dom/reconciler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { create_element } from './operations.js';
44

55
const policy =
6+
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
67
globalThis?.window?.trustedTypes &&
78
/* @__PURE__ */ globalThis.window.trustedTypes.createPolicy('svelte-trusted-html', {
89
/** @param {string} html */

0 commit comments

Comments
 (0)