From c407e32368b036eb903f1b96b18ecf95a0eb5853 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 11 Jun 2019 09:45:45 +0200 Subject: [PATCH] DEV: should check on object and not length (#7742) --- app/assets/javascripts/select-kit/mixins/events.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/select-kit/mixins/events.js.es6 b/app/assets/javascripts/select-kit/mixins/events.js.es6 index df979694d2b..e41b1dfc23c 100644 --- a/app/assets/javascripts/select-kit/mixins/events.js.es6 +++ b/app/assets/javascripts/select-kit/mixins/events.js.es6 @@ -60,7 +60,7 @@ export default Ember.Mixin.create({ _cleanUpEvents() { $(document).off("mousedown.select-kit", this._boundMouseDownHandler); - if (this.$header().length) { + if (this.$header()) { this.$header() .off("blur.select-kit", this._boundBlurHeaderHandler) .off("focus.select-kit", this._boundFocusHeaderHandler) @@ -68,7 +68,7 @@ export default Ember.Mixin.create({ .off("keypress.select-kit", this._boundKeypressHeaderHandler); } - if (this.$filterInput().length) { + if (this.$filterInput()) { this.$filterInput() .off("change.select-kit", this._boundChangeFilterInputHandler) .off("keypress.select-kit", this._boundKeypressFilterInputHandler)