Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

checking length on undefined. #1105

Closed
Closed
@gshireesh

Description

@gshireesh

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions