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

Update disable_erd condition #227

Merged
merged 1 commit into from
Aug 6, 2023
Merged

Conversation

lucia-w
Copy link
Contributor

@lucia-w lucia-w commented Aug 4, 2023

Boolean('false') in js returns true because a non-empty string is considered "truthy" in js.

@lucia-w
Copy link
Contributor Author

lucia-w commented Aug 4, 2023

Hey @keonik,
In Node.js, environment variables are persistently stored as string data types. Consequently, irrespective of whether you assign DISABLE_ERD the Boolean value of false, it is ultimately retained in the memory as the string value "false". A potential point of confusion arises when attempting to convert this string value to a Boolean in JavaScript using Boolean('false'). This results in true as JavaScript considers any non-empty string to be "truthy", rather than evaluating its semantic content. I trust this clarifies the intricacies of data type conversion in this context.

When you have a spare moment, could you kindly review this pull request? Your insight and feedback would be greatly appreciated. Thank you for your support.

Cheers,
Lucia

@keonik
Copy link
Owner

keonik commented Aug 6, 2023

Makes perfect sense! Good catch!

@keonik
Copy link
Owner

keonik commented Aug 6, 2023

@all-contributors please add @shiralwz for fixing a bug

@allcontributors
Copy link
Contributor

@keonik

I've put up a pull request to add @shiralwz! 🎉

@keonik
Copy link
Owner

keonik commented Aug 6, 2023

closes #225

@keonik keonik merged commit 60a78ba into keonik:main Aug 6, 2023
6 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.10.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants