Describe the bug
When you have files with permalink: false then outputPath.endsWith check fails.
if(outputPath.endsWith('.html')) { … }
> Having trouble writing template: false (TemplateWriterWriteError)
> outputPath.endsWith is not a function (TypeError):
To Reproduce
- Create a file with
permalink: false that resolves into *.html
- Add a transform, just like in this example.
- Build
Expected behavior
Successful build.
Environment:
- OS and Version: macOS 10.14.6
- Eleventy Version: 0.8.3
Additional context
It could be fixed by checking if outputPath is available:
if(outputPath && outputPath.endsWith('.html')) { … }
…or by changing the outputPath behavior, which is preferable :)
Describe the bug
When you have files with
permalink: falsethenoutputPath.endsWithcheck fails.To Reproduce
permalink: falsethat resolves into*.htmlExpected behavior
Successful build.
Environment:
Additional context
It could be fixed by checking if
outputPathis available:…or by changing the
outputPathbehavior, which is preferable :)