Commit d81105ad authored by Dan Allen's avatar Dan Allen
Browse files

don't attempt to set undefined contents on bundled file

parent e9a20c49
......@@ -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)
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment