Skip to content

A platform for community discussion. Free, open, simple.

FIX: exception when pressing backspace on empty selection (#7587)

Joffrey JAFFEUXcf63a9bb5385
diff --git a/app/assets/javascripts/select-kit/mixins/events.js.es6 b/app/assets/javascripts/select-kit/mixins/events.js.es6
index 167fc223e0d..7c8ac46684e 100644
--- a/app/assets/javascripts/select-kit/mixins/events.js.es6
+++ b/app/assets/javascripts/select-kit/mixins/events.js.es6
@@ -249,7 +249,7 @@ export default Ember.Mixin.create({
return;
}
- if (!this.get("selection").length) return;
+ if (!this.selection || !this.selection.length) return;
if (!Ember.isEmpty(this.get("filter"))) {
this.clearHighlightSelection();