diff --git a/.versions b/.versions index 0e87f0d..d84065b 100644 --- a/.versions +++ b/.versions @@ -9,7 +9,7 @@ ddp@1.1.0 deps@1.0.7 ejson@1.0.6 gadicohen:famous@0.5.2 -gadicohen:famous-views@1.3.0-rc.3 +gadicohen:famous-views@1.3.0-rc.4 gadicohen:modules@0.0.5 geojson-utils@1.0.3 html-tools@1.0.4 @@ -18,7 +18,7 @@ id-map@1.0.3 jag:pince@0.0.8 jquery@1.11.3_2 json@1.0.3 -local-test:gadicohen:famous-views@1.3.0-rc.3 +local-test:gadicohen:famous-views@1.3.0-rc.4 logging@1.0.7 meteor@1.1.6 minifiers@1.1.5 diff --git a/lib/meteor/tracker.js b/lib/meteor/tracker.js index 7d4711c..db59792 100644 --- a/lib/meteor/tracker.js +++ b/lib/meteor/tracker.js @@ -127,9 +127,12 @@ var withNoYieldsAllowed = function (f) { //#fview //var nextId = 1; -var nextId = Math.max.apply(Math, - _.map(_.keys(Tracker._computations), function(x) { return parseInt(x); })) - + 1; +var nextId; +if (Tracker._computations.length) + nextId = 1 + Math.max.apply(Math, + _.map(_.keys(Tracker._computations), function(x) { return parseInt(x); })); +else + nextId = 1; // computations whose callbacks we should call at flush time var pendingComputations = []; diff --git a/package.js b/package.js index f03e091..161c4d5 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'gadicohen:famous-views', - version: '1.3.0-rc.3', + version: '1.3.0-rc.4', summary: 'Famous, the Meteor Way (with Reactive Blaze Templates/Views)', git: 'https://github.com/gadicc/meteor-famous-views.git' });