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

Suggest making strict mode more configurable #74

Closed
n1ru4l opened this issue Feb 16, 2018 · 2 comments
Closed

Suggest making strict mode more configurable #74

n1ru4l opened this issue Feb 16, 2018 · 2 comments

Comments

@n1ru4l
Copy link
Contributor

n1ru4l commented Feb 16, 2018

There are some libraries that check if an object is a Promise. Accessing the .then property causes an error 😅

Would be awesome to only use the "remove additional environment variables" option or maybe to allow checking for ".then" method or maybe there is a better way to test the object in the package ?

@af
Copy link
Owner

af commented Feb 20, 2018

Ah I see, so a library is checking for .then() on the env object? We've had to work around similar checks to allow console.log to work with strict mode env objects. Could you try adding 'then' to the inspectables array in strictProxy.js, and see if that fixes the issue for you with this library? If that works we should be able to add this small change to one of the next releases.

n1ru4l added a commit to n1ru4l/envalid that referenced this issue Feb 20, 2018
n1ru4l added a commit to n1ru4l/envalid that referenced this issue Feb 20, 2018
af pushed a commit that referenced this issue Feb 22, 2018
@SimenB
Copy link
Collaborator

SimenB commented Feb 22, 2018

#76

@SimenB SimenB closed this as completed Feb 22, 2018
tuannm151 pushed a commit to BSSCommerce/shopify-envalid that referenced this issue Jul 1, 2024
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