Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

change check for "children" in populateResults #387

Merged
merged 1 commit into from

2 participants

@markmarkoh

("children" in result) && result.children.length fails if children is explicitly null.

@markmarkoh markmarkoh safer check for result.children
`("children" in result) && result.children.length` fails if children is explicitly null.
7c2dba8
@ivaynberg ivaynberg merged commit 819cca7 into select2:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 6, 2012
  1. @markmarkoh

    safer check for result.children

    markmarkoh authored
    `("children" in result) && result.children.length` fails if children is explicitly null.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  select2.js
View
2  select2.js
@@ -692,7 +692,7 @@
result=results[i];
selectable=id(result) !== undefined;
- compound=("children" in result) && result.children.length > 0;
+ compound=result.children && result.children.length > 0;
node=$("<li></li>");
node.addClass("select2-results-dept-"+depth);
Something went wrong with that request. Please try again.