Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit b68e125

Browse files
gust42danbucholtz
authored andcommitted
fix(inline-templates): check for existence of content (#557)
* Fixes error with templateUpdate and multiple js files on same path * fix(inline-templates): check for existence of content
1 parent f632298 commit b68e125

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/template.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function updateCorrespondingJsFile(context: BuildContext, newTemplateContent: st
5454
const javascriptFiles = context.fileCache.getAll().filter((file: File) => dirname(file.path) === dirname(existingHtmlTemplatePath) && extname(file.path) === '.js');
5555
for (const javascriptFile of javascriptFiles) {
5656
const newContent = replaceExistingJsTemplate(javascriptFile.content, newTemplateContent, existingHtmlTemplatePath);
57-
if (newContent !== javascriptFile.content) {
57+
if (newContent && newContent !== javascriptFile.content) {
5858
javascriptFile.content = newContent;
5959
// set the file again to generate a new timestamp
6060
// do the same for the typescript file just to invalidate any caches, etc.

0 commit comments

Comments
 (0)