safer check for result.children
`("children" in result) && result.children.length` fails if children is explicitly null.
This commit is contained in:
parent
281f314fd7
commit
7c2dba8fe0
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user