Skip to content

Commit

Permalink
Merging PR #14
Browse files Browse the repository at this point in the history
Escape the filename in the array of files.

Closes #14
  • Loading branch information
jkleinsc committed Dec 15, 2015
1 parent 60212ff commit 2637e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ BroccoliServiceWorker.prototype.write = function(readTree, destDir) {
lines.push("var urlsToPrefetch = [");
lines.push(" '/',");
getFilesRecursively(srcDir, [ "**/*" ]).forEach(function (file, idx, array) {
lines.push(createArrayLine(" '"+file+"'", idx, array.length));
lines.push(createArrayLine(' '+JSON.stringify(file), idx, array.length));
});
lines.push("];");
precacheURLs.forEach(function (file, idx, array) {
Expand Down

0 comments on commit 2637e35

Please sign in to comment.