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

Unexpected overwrite falsey value #30

Open
thzt opened this issue Feb 20, 2017 · 0 comments
Open

Unexpected overwrite falsey value #30

thzt opened this issue Feb 20, 2017 · 0 comments

Comments

@thzt
Copy link
Contributor

thzt commented Feb 20, 2017

lib/inject.js line 23

if (!isOverride && obj[property]) {    //what about isOverride:false, obj[propery]:0
    throw new Error('can\'t overwrite property ' + property);
}

obj[property] may be Falsey Value, such as 0, '', false ...
these values will be overrided although isOverride is false.

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

1 participant