jannbmsy / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Attempting to use key of 0 fails #420

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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
}

Original issue reported on code.google.com by slubow...@gmail.com on 12 Apr 2013 at 9:00

GoogleCodeExporter commented 8 years ago

Original comment by moo...@wwwendt.de on 13 Apr 2013 at 6:45

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r663.

Original comment by moo...@wwwendt.de on 13 Apr 2013 at 7:53

GoogleCodeExporter commented 8 years ago
Issue 435 has been merged into this issue.

Original comment by moo...@wwwendt.de on 6 Jun 2013 at 5:48

GoogleCodeExporter commented 8 years ago
Issue 435 has been merged into this issue.

Original comment by moo...@wwwendt.de on 6 Jun 2013 at 6:03

GoogleCodeExporter commented 8 years ago
Issue 445 has been merged into this issue.

Original comment by moo...@wwwendt.de on 8 Sep 2013 at 6:33