Last active
December 17, 2015 05:39
-
-
Save aaronj1335/5559916 to your computer and use it in GitHub Desktop.
meteor exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Exception from Deps recompute: Error: Can't create second landmark in same branch | |
| at Object.Spark.createLandmark (http://localhost:3000/packages/spark/spark.js?4af332696fb84f1c71f2e678ad0a267755b2b828:1169:13) | |
| at http://localhost:3000/packages/templating/deftemplate.js?9369dfa782cc1c8cd4d568925617249ec480b84f:116:24 | |
| at Object.Spark.labelBranch (http://localhost:3000/packages/spark/spark.js?4af332696fb84f1c71f2e678ad0a267755b2b828:1114:14) | |
| at Object.Meteor._def_template.partial [as row] (http://localhost:3000/packages/templating/deftemplate.js?9369dfa782cc1c8cd4d568925617249ec480b84f:115:22) | |
| at http://localhost:3000/packages/handlebars/evaluate.js?742a34cf3479d95600582786665b53c0eba4f7d9:352:48 | |
| at Object.Spark.labelBranch (http://localhost:3000/packages/spark/spark.js?4af332696fb84f1c71f2e678ad0a267755b2b828:1114:14) | |
| at branch (http://localhost:3000/packages/handlebars/evaluate.js?742a34cf3479d95600582786665b53c0eba4f7d9:311:20) | |
| at template (http://localhost:3000/packages/handlebars/evaluate.js?742a34cf3479d95600582786665b53c0eba4f7d9:351:20) | |
| at Array.forEach (native) | |
| at Function._.each._.forEach (http://localhost:3000/packages/underscore/underscore.js?6d71e6711255f43c0de8090f2c8b9f60534a699b:79:11) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Handlebars.registerHelper('each_with_previous', function(cursor, fn) { | |
| var previous; | |
| return cursor.map(function(item) { | |
| return fn({ | |
| previous: previous, | |
| item: previous = item | |
| }); | |
| }); | |
| }); | |
| Template.messages.beingViewed = function() { | |
| var pageSize = 100; | |
| var page = Session.get('page'); | |
| return messages.find({}, {limit: pageSize, offset: pageSize * page}); | |
| }; | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i'm trying to iterate through the results of a
collection.find()call in a template (like with{{#each}}), but i'm going to want to be able to check the previous row in therowtemplate, so i'm trying to make thiseach_with_previoustemplate helper work.