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

Ensure $select.selected exists prior to testing length. #996

Closed
wants to merge 1 commit into from

Conversation

sime
Copy link
Contributor

@sime sime commented Jun 5, 2015

I have a use case where following exception is being thrown. To be honest I do not totally understand the execution path, but handling this exception seems obvious enough.

TypeError: Cannot read property 'length' of undefined at uis.directive.controller.ctrl.getPlaceholder

@user378230
Copy link
Contributor

Appears to be in place already

if($select.selected && $select.selected.length) return;

We should probably use isEmpty really though when I come to think about it.

@user378230 user378230 closed this Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants