From ab0480d71eab969577fec209c34d9b6ef873a56c Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 16 Jan 2018 00:35:07 +0100 Subject: [PATCH] Use `remove` event instead of `destroy` --- src/dom_components/model/Component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index 0c95340a4..c94d83f00 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -176,7 +176,7 @@ const Component = Backbone.Model.extend(Styleable).extend( this.config = opt.config || {}; this.ccid = Component.createId(this); this.set('attributes', this.get('attributes') || {}); - this.on('destroy', this.handleRemove); + this.on('remove', this.handleRemove); this.listenTo(this, 'change:script', this.scriptUpdated); this.listenTo(this, 'change:traits', this.traitsUpdated); this.listenTo(this, 'change:tagName', this.tagUpdated);