checking length on undefined. #1105
Description
at
ctrl.getPlaceholder = function(){
//Refactor single?
if($select.selected.length) return;
// code suggested here if($select.selected && $select.selected.length) RETURN;
return $select.placeholder;
};
angular.js:12330 TypeError: Cannot read property 'length' of undefined
at uis.directive.controller.ctrl.getPlaceholder (http://localhost:3000/vendor/js/select.js:1148:28)
at fn (eval at (http://localhost:3000/vendor/js/angular.js:13145:15), :2:285)
at Object.expressionInputWatch as get
at Scope.$get.Scope.$digest (http://localhost:3000/vendor/js/angular.js:15675:40)
at Scope.$get.Scope.$apply (http://localhost:3000/vendor/js/angular.js:15951:24)
at HTMLDivElement. (http://localhost:3000/vendor/js/angular.js:23303:23)
at HTMLDivElement.jQuery.each.jQuery.event.special.(anonymous function).handle (http://localhost:3000/vendor/js/jquery.js:4765:29)
at HTMLDivElement.jQuery.event.dispatch (http://localhost:3000/vendor/js/jquery.js:4435:9)
at HTMLDivElement.jQuery.event.add.elemData.handle (http://localhost:3000/vendor/js/jquery.js:4121:28)