From 6b1cfd8d87eced54fb97b523ff5c549c7e8b7898 Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 30 Jun 2015 11:47:02 -0700 Subject: [PATCH] FIX: combo-box shouldn't crash if no options available This is a fix for bdfe91914f --- app/assets/javascripts/discourse/components/combo-box.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/combo-box.js.es6 b/app/assets/javascripts/discourse/components/combo-box.js.es6 index b33a2ace25f..625361550fc 100644 --- a/app/assets/javascripts/discourse/components/combo-box.js.es6 +++ b/app/assets/javascripts/discourse/components/combo-box.js.es6 @@ -69,7 +69,7 @@ export default Ember.Component.extend({ const castInteger = this.get('castInteger'); $elem.on("change", function (e) { let val = $(e.target).val(); - if (val.length && castInteger) { + if (val && val.length && castInteger) { val = parseInt(val, 10); } self.set('value', val);