Skip to content

Commit 50b1c6b

Browse files
committed
Grid todo-app demo: Inline id generator
1 parent c739542 commit 50b1c6b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

grid-editing/todo-app.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
initial: []
2222
});
2323
var todos = store.load();
24-
var ids = todos.length;
2524

2625
$( ":submit" ).button();
2726

@@ -49,7 +48,7 @@
4948
return;
5049
}
5150
$.observable( todos ).insert({
52-
id: ids++,
51+
id: todos.length + 1,
5352
title: input.val()
5453
});
5554
input.val( "" );

0 commit comments

Comments
 (0)