@ -621,8 +621,10 @@ const Component = Backbone.Model.extend(Styleable).extend(
__isSymbolTop() {
const parent = this.parent();
const symb = this.__isSymbol() || this.__getSymbol();
return (
!parent || (parent && !parent.__isSymbol() && !parent.__getSymbol())
symb &&
(!parent || (parent && !parent.__isSymbol() && !parent.__getSymbol()))
);
},
@ -43,6 +43,8 @@ describe('Symbols', () => {
wrapper.components().reset();
});
// TODO check that clone itself doesn't create symbols
test('Create symbol from a component', () => {
const comp = wrapper.append(simpleComp)[0];
const symbol = createSymbol(comp);