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

Fix a bug occuring when outputPaths is undefined #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cahnory
Copy link

@cahnory cahnory commented Jan 31, 2017

When outputPaths is undefined, outputPaths is happened to an array resulting in an error at 44:42

Cannot read property 'replace' of undefined

I chosed to use the bundle name with html extension as default path.

Empty string will be considered as undefined. I could have done:

this.outputPaths = Array.isArray(outputPaths) ? outputPaths : ['string' === typeof outputPaths ? outputPaths : renderSrc + '.html']

but it seemed unjustified.

When *outputPaths* is `undefined`, *outputPaths* is happened to an `array` resulting in an error at 44:42

> Cannot read property 'replace' of undefined

I chosed to use the bundle name with html extension as default path.

Empty string will be considered as undefined. I could have done:

```
this.outputPaths = Array.isArray(outputPaths) ? outputPaths : ['string' === typeof outputPaths ? outputPaths : renderSrc + '.html']
```

but it seemed unjustified.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 56c412a on cahnory:patch-1 into 35c9aa2 on markdalgleish:master.

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

Successfully merging this pull request may close these issues.

None yet

2 participants