From 66661eff04ea8c4eb1810302fecef4df7ef99fc4 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 13 Nov 2023 20:40:20 -0500 Subject: [PATCH] chore: use internal `get_descriptors` helper (#9389) * chore: use internal get_descriptors helper * tweak changeset * fix bad merge --------- Co-authored-by: Rich Harris --- .changeset/brave-walls-destroy.md | 5 +++++ packages/svelte/src/internal/client/render.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/brave-walls-destroy.md diff --git a/.changeset/brave-walls-destroy.md b/.changeset/brave-walls-destroy.md new file mode 100644 index 0000000000..86737de23f --- /dev/null +++ b/.changeset/brave-walls-destroy.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +chore: use internal `get_descriptors` helper diff --git a/packages/svelte/src/internal/client/render.js b/packages/svelte/src/internal/client/render.js index e1395666c5..25822aec46 100644 --- a/packages/svelte/src/internal/client/render.js +++ b/packages/svelte/src/internal/client/render.js @@ -68,7 +68,7 @@ import { hydrate_block_anchor, set_current_hydration_fragment } from './hydration.js'; -import { array_from, define_property, get_descriptor, is_array } from './utils.js'; +import { array_from, define_property, get_descriptor, get_descriptors, is_array } from './utils.js'; import { is_promise } from '../common.js'; import { bind_transition } from './transitions.js'; @@ -2824,7 +2824,7 @@ function get_setters(element) { /** @type {string[]} */ const setters = []; // @ts-expect-error - const descriptors = Object.getOwnPropertyDescriptors(element.__proto__); + const descriptors = get_descriptors(element.__proto__); for (const key in descriptors) { if (descriptors[key].set && !always_set_through_set_attribute.includes(key)) { setters.push(key);