Skip to content

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.

2 participants