Hey guys,
I’m having a strange behavior using Meteor 3 + the updated Fast-Render package. When I call 2 different Meteor methods after FastRender.onDataReady (client), “this.userId” is always undefined in the second method call. This only happens if I call the functions at the same time. If I call them one by one (with async / await), the error doesn’t happen.
Does anyone have an idea what the problem could be?
// Edit:
Okay, just tested a little bit with ChatGPT. I’ve replaced the following line in Fast-Render:
frContext: DDP._CurrentInvocation,
with
frContext: {
get: () => asyncLocalStorage.getStore(),
withValue: async (context, fn) => {
return asyncLocalStorage.run(context, fn);
}
},
This seems to work. Does anybody know if this could have some side effects? Would be great if someone can tell me before I open a PR.