pull/5890/head
pushkine 6 years ago
parent 8180c5dd6c
commit 8ca9541391

@ -378,8 +378,10 @@ export default class InlineComponentWrapper extends Wrapper {
const body = b`
function ${id}(${params}) {
${lhs} = #value;
${renderer.invalidate(dependencies[0])};
if ($$self.$$.not_equal(${lhs}, #value)) {
${lhs} = #value;
${renderer.invalidate(dependencies[0])};
}
}
`;

@ -0,0 +1,5 @@
export default {
async test({ assert, component }) {
assert.equal(component.object_updates, 1);
},
};

@ -0,0 +1,10 @@
<script>
import Component from "./Component.svelte";
export let object_updates = 0;
let arr = [""];
$: if (arr) object_updates++;
</script>
<Component bind:value={arr[0]} />
Loading…
Cancel
Save