mirror of https://github.com/sveltejs/svelte
Fixes #452. Fixed an issue that caused setting `computed` to an empty object to prevent the component from compiling.
parent
d105b6ba4c
commit
3ed4dc68ee
@ -0,0 +1,8 @@
|
||||
export default {
|
||||
html: '<div>empty</div>',
|
||||
test ( assert, component, target ) {
|
||||
assert.equal( component.get( 'created' ), true );
|
||||
assert.equal( target.innerHTML, '<div>empty</div>' );
|
||||
component.destroy();
|
||||
}
|
||||
};
|
@ -0,0 +1,14 @@
|
||||
<div>empty</div>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {};
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
oncreate () {
|
||||
this.set({ created: true });
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue