don't attempt to set undefined contents on bundled file
authorDan Allen <dan@opendevise.com>
Wed, 29 Apr 2020 08:04:29 +0000 (02:04 -0600)
committerDan Allen <dan@opendevise.com>
Wed, 29 Apr 2020 08:06:15 +0000 (02:06 -0600)
gulp.d/tasks/build.js

index cbbb0ca..7a29aa3 100644 (file)
@@ -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)
                 })