mirror of https://github.com/sveltejs/svelte
fix: resolve legacy component props equality for mutations (#12348)
* fix: resolve legacy component props equality for mutations * lint * Update packages/svelte/src/legacy/legacy-client.js * simplify test * rename test * make all proxies immutable * remove unused parameter --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/12353/head
parent
63f3ee4ffd
commit
ee47696986
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: resolve legacy component props equality for mutations
|
@ -0,0 +1,24 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
message: 'hello'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
get props() {
|
||||||
|
data.message = 'hello';
|
||||||
|
|
||||||
|
return {
|
||||||
|
data
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
html: '<p>hello</p>',
|
||||||
|
|
||||||
|
async test({ assert, component, target }) {
|
||||||
|
data.message = 'goodbye';
|
||||||
|
await component.$set({ data });
|
||||||
|
|
||||||
|
assert.htmlEqual(target.innerHTML, '<p>goodbye</p>');
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
export let data;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<p>{data.message}</p>
|
Loading…
Reference in new issue