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

Validation function buggy behaviour #18

Open
pyxarez opened this issue Aug 30, 2018 · 0 comments
Open

Validation function buggy behaviour #18

pyxarez opened this issue Aug 30, 2018 · 0 comments

Comments

@pyxarez
Copy link

pyxarez commented Aug 30, 2018

https://github.com/jugglinmike/srcdoc-polyfill/blob/master/srcdoc-polyfill.js#L33
This is a bug it should look like this:

...
} else if (!options || options.force === false) {
...

Just think about it
The second check (!options || options.force !== false) does not make sense
The case should be triggered when there is some options passed in and the "force" property has "not falsy" value what is literally duplicate the first if branch

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