Skip to content

Commit

Permalink
add __svelte_meta to prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed May 8, 2024
1 parent 4a0e639 commit e47d0b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/svelte/src/internal/client/dom/operations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { hydrate_anchor, hydrate_nodes, hydrating } from './hydration.js';
import { get_descriptor } from '../utils.js';
import { DEV } from 'esm-env';

// We cache the Node and Element prototype methods, so that we can avoid doing
// expensive prototype chain lookups.
Expand Down Expand Up @@ -70,6 +71,11 @@ export function init_operations() {
// @ts-expect-error
element_prototype.__attributes = null;

if (DEV) {
// @ts-expect-error
element_prototype.__svelte_meta = null;
}

first_child_get = /** @type {(this: Node) => ChildNode | null} */ (
// @ts-ignore
get_descriptor(node_prototype, 'firstChild').get
Expand Down

0 comments on commit e47d0b9

Please sign in to comment.