Skip to content

Commit

Permalink
Merge pull request #100 from iiroj/buffer-from-array
Browse files Browse the repository at this point in the history
Buffer.from should initialize from empty array without sourcemap
  • Loading branch information
STRML committed Apr 30, 2019
2 parents 5221397 + 0a8aff7 commit 4b2caf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion babel-watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function restartAppInternal() {
}
handleFileLoad(filename, (source, sourceMap) => {
const sourceBuf = new Buffer.from(source || '');
const mapBuf = new Buffer.from(sourceMap ? JSON.stringify(sourceMap) : 0);
const mapBuf = new Buffer.from(sourceMap ? JSON.stringify(sourceMap) : []);
const lenBuf = new Buffer.alloc(4);
if (pipeFd) {
try {
Expand Down

0 comments on commit 4b2caf3

Please sign in to comment.