Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/svelte/src/internal/client/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ export function exclude_from_object(obj, keys) {
}

for (var symbol of Object.getOwnPropertySymbols(obj)) {
if (!keys.includes(symbol)) {
if (Object.propertyIsEnumerable.call(obj, symbol) && !keys.includes(symbol)) {
result[symbol] = obj[symbol];
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test } from '../../test';

export default test({
html: `<p>42</p>`
html: `<p>true false</p>`
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<script>
const symbol = Symbol();
const symbol1 = Symbol();
const symbol2 = Symbol();

let a = { [symbol1]: 42 };
Object.defineProperty(a, symbol2, { enumerable: false, value: "nope" })

let a = { [symbol]: 42 };
let { ...b } = $derived(a);
</script>

<p>{b[symbol]}</p>
<p>{symbol1 in b} {symbol2 in b}</p>
Loading