ajinks
ajinks

Reputation: 11

Uncaught RangeError: Maximum call stack size exceeded in Meteor

Getting this error while trying to use code below:

Session.set("MyTemplate_Instance",Template.instance());

I am trying to store a Template Instance into the session variable is it supported by meteor?

Trying to do something like,

Template 1

Session.set("MyTemplate_Instance",Template.instance());

Template 2

Template.instance() = Session.get("MyTemplate_Instance")

Upvotes: 0

Views: 169

Answers (1)

This error occurs when you pass large object as an argument to a method. Do you really want the have all the template instance in your Session variable ?

Example: If you want to store the template data, you should store only the data like this :

Session.set("MyTemplateData", Template.instance().data);

Check this answer: https://stackoverflow.com/a/18691480/4601487

Upvotes: 1

Related Questions