| Issue 420: | Attempting to use key of 0 fails | |
| 3 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1.Create a tree, pass a node with data.key set to the number 0 (not string)
What is the expected output? What do you see instead?
Expect key to be 0. Key is arbitrary generated key instead.
What version of the dynatree and jQuery are you using?
slightly modified dynatree 1.2.4
jQuery 1.9.1
On what operating system and browser?
Windows + Chrome
What DOCTYPE declaration are you using?
<!DOCTYPE html>
Please provide any additional information below.
Code at about line 200 incorrectly treats 0 as non key. Should check for undefined instead. This is a regression as existing code using old version of dynatree works.
if( !data.key ){
data.key = "_" + tree._nodeCount++;
}else{
data.key = "" + data.key; // issue 371
}
Jun 6, 2013
Issue 435 has been merged into this issue.
Jun 6, 2013
Issue 435 has been merged into this issue.
Sep 7, 2013
Issue 445 has been merged into this issue. |
Labels: Milestone-Release1.2.5