events/resize: fix teardown

This commit is contained in:
jean-emmanuel 2018-01-24 15:36:34 +01:00
parent cf43836778
commit 9f3c762926

View file

@ -51,9 +51,8 @@ module.exports = {
teardown: function() {
if (!options) return
elements.push(options.element)
if (elements.indexOf(options.element) == -1) {
if (elements.indexOf(options.element) != -1) {
elements.splice(elements.indexOf(options.element), 1)
delete options.element._resize_widget
}