Skip to content

Commit

Permalink
chore: use internal get_descriptors helper (#9389)
Browse files Browse the repository at this point in the history
* chore: use internal get_descriptors helper

* tweak changeset

* fix bad merge

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
  • Loading branch information
Rich-Harris and Rich-Harris committed Nov 14, 2023
1 parent 7ab03ae commit 66661ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-walls-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

chore: use internal `get_descriptors` helper
4 changes: 2 additions & 2 deletions packages/svelte/src/internal/client/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down

1 comment on commit 66661ef

@vercel
Copy link

@vercel vercel bot commented on 66661ef Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svelte-5-preview – ./sites/svelte-5-preview

svelte-octane.vercel.app
svelte-5-preview-svelte.vercel.app
svelte-5-preview-git-main-svelte.vercel.app
svelte-5-preview.vercel.app

Please sign in to comment.