mirror of https://github.com/sveltejs/svelte
commit
a30730cf2d
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: preserve symbols when creating derived rest properties
|
||||
@ -0,0 +1,5 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<p>true false</p>`
|
||||
});
|
||||
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
const symbol1 = Symbol();
|
||||
const symbol2 = Symbol();
|
||||
|
||||
let a = { [symbol1]: 42 };
|
||||
Object.defineProperty(a, symbol2, { enumerable: false, value: "nope" })
|
||||
|
||||
let { ...b } = $derived(a);
|
||||
</script>
|
||||
|
||||
<p>{symbol1 in b} {symbol2 in b}</p>
|
||||
Loading…
Reference in new issue