chore: use internal `get_descriptors` helper (#9389)

* chore: use internal get_descriptors helper

* tweak changeset

* fix bad merge

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/9438/head
Rich Harris 1 year ago committed by GitHub
parent 7ab03ae36c
commit 66661eff04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,5 @@
---
'svelte': patch
---
chore: use internal `get_descriptors` helper

@ -68,7 +68,7 @@ import {
hydrate_block_anchor, hydrate_block_anchor,
set_current_hydration_fragment set_current_hydration_fragment
} from './hydration.js'; } 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 { is_promise } from '../common.js';
import { bind_transition } from './transitions.js'; import { bind_transition } from './transitions.js';
@ -2824,7 +2824,7 @@ function get_setters(element) {
/** @type {string[]} */ /** @type {string[]} */
const setters = []; const setters = [];
// @ts-expect-error // @ts-expect-error
const descriptors = Object.getOwnPropertyDescriptors(element.__proto__); const descriptors = get_descriptors(element.__proto__);
for (const key in descriptors) { for (const key in descriptors) {
if (descriptors[key].set && !always_set_through_set_attribute.includes(key)) { if (descriptors[key].set && !always_set_through_set_attribute.includes(key)) {
setters.push(key); setters.push(key);

Loading…
Cancel
Save