meteor/meteor

[Meteor 3] EnvironmentVariable.withValue has different return value on client and server

zodern opened this issue · 0 comments

With this code:

let ev1 = new Meteor.EnvironmentVariable();

console.log(ev1.withValue(10, () => 5));

On the client it logs 5, and on the server it logs a promise. It should be the same on both the server and client.

Once #13112 is fixed, it should be fairly simple to have withValue synchronously return the value from the function, so it is only async if the passed function is also async, and it would behave the same on the client and server.