Skip to content

Commit

Permalink
fixed nextID in Utils of js version.
Browse files Browse the repository at this point in the history
  • Loading branch information
asalga committed Aug 17, 2013
1 parent dee3fcb commit 1f3208b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
*/
var Utils = {

id = -1,

/*
Used to identify tokens.
*/
nextID: function(){
return id++;
var inc =
(function(){
var id = -1;
return function(){
id++;
}
})();
return inc();
},

/*
Expand Down Expand Up @@ -51,5 +56,5 @@ var Utils = {

return baseString;
}

}

0 comments on commit 1f3208b

Please sign in to comment.