Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zodern opened this issue Apr 26, 2024 · 0 comments
Assignees
Milestone

Comments

@zodern
Copy link
Member

zodern commented Apr 26, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants