mirror of
https://github.com/discourse/discourse.git
synced 2025-04-27 19:34:29 +08:00
DEV: should check on object and not length (#7742)
This commit is contained in:
parent
e5cace9185
commit
c407e32368
@ -60,7 +60,7 @@ export default Ember.Mixin.create({
|
|||||||
_cleanUpEvents() {
|
_cleanUpEvents() {
|
||||||
$(document).off("mousedown.select-kit", this._boundMouseDownHandler);
|
$(document).off("mousedown.select-kit", this._boundMouseDownHandler);
|
||||||
|
|
||||||
if (this.$header().length) {
|
if (this.$header()) {
|
||||||
this.$header()
|
this.$header()
|
||||||
.off("blur.select-kit", this._boundBlurHeaderHandler)
|
.off("blur.select-kit", this._boundBlurHeaderHandler)
|
||||||
.off("focus.select-kit", this._boundFocusHeaderHandler)
|
.off("focus.select-kit", this._boundFocusHeaderHandler)
|
||||||
@ -68,7 +68,7 @@ export default Ember.Mixin.create({
|
|||||||
.off("keypress.select-kit", this._boundKeypressHeaderHandler);
|
.off("keypress.select-kit", this._boundKeypressHeaderHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$filterInput().length) {
|
if (this.$filterInput()) {
|
||||||
this.$filterInput()
|
this.$filterInput()
|
||||||
.off("change.select-kit", this._boundChangeFilterInputHandler)
|
.off("change.select-kit", this._boundChangeFilterInputHandler)
|
||||||
.off("keypress.select-kit", this._boundKeypressFilterInputHandler)
|
.off("keypress.select-kit", this._boundKeypressFilterInputHandler)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user