From d81105ad6e35172bf90d53659c65dc5548c7e84a Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Wed, 29 Apr 2020 02:04:29 -0600 Subject: [PATCH] don't attempt to set undefined contents on bundled file --- gulp.d/tasks/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp.d/tasks/build.js b/gulp.d/tasks/build.js index cbbb0ca..7a29aa3 100644 --- a/gulp.d/tasks/build.js +++ b/gulp.d/tasks/build.js @@ -75,7 +75,7 @@ module.exports = (src, dest, preview) => () => { Promise.all(mtimePromises).then((mtimes) => { const newestMtime = mtimes.reduce((max, curr) => (!max || curr > max ? curr : max)) if (newestMtime > file.stat.mtime) file.stat.mtimeMs = +(file.stat.mtime = newestMtime) - file.contents = bundleBuffer + if (bundleBuffer !== undefined) file.contents = bundleBuffer file.path = file.path.slice(0, file.path.length - 10) + '.js' next(bundleError, file) })