Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

In README it is said “falsy value to remove all comments”. Not quite true #67

Open
Juribiyan opened this issue Oct 25, 2017 · 2 comments

Comments

@Juribiyan
Copy link

I have set {comments: null} (just a personal preference, null is a falsy value) in PluginOpts and it broke my build with the ERROR in unknown: Cannot read property 'test' of null. I was confused for quite some time untill I guessed to set comments explicitly to false and it worked.

@boopathi
Copy link
Member

Thanks. Good catch.

typeof null === object. So it applies a .test call thinking it's a regex. Would you like to send a PR?

@ad1992
Copy link

ad1992 commented Sep 23, 2018

@boopathi can I take this up?

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

No branches or pull requests

3 participants