Skip to content

Commit

Permalink
Fix issue #862 (#863)
Browse files Browse the repository at this point in the history
* Fix issue #862

The following changes were applied:

  - Added a condition where the property "file" is checked. If it
    doesn't exist it is copied from the original source file.

* Fix indentation typo

* Fix index.js with 'yarn lint --fix'
  • Loading branch information
egasato authored and boopathi committed May 22, 2018
1 parent 01eac1c commit 2ec8ff7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/gulp-babel-minify/src/index.js
Expand Up @@ -63,6 +63,9 @@ function gulpBabelMinify(
if (success) {
file.contents = new Buffer(result.code);
if (file.sourceMap) {
if (!result.map.hasOwnProperty("file")) {
result.map.file = file.sourceMap.file;
}
applySourceMap(file, result.map);
}
return callback(null, file);
Expand Down

0 comments on commit 2ec8ff7

Please sign in to comment.