Skip to content

Commit 9525d13

Browse files
committed
Adds missing short-circuit 🙈
1 parent d9d0341 commit 9525d13

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/write-commithash-file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var removeEmptyLines = require('./helpers/remove-empty-lines.js')
44
module.exports = function writeCommithashFile (compiler) {
55
compiler.plugin('emit', function (compilation, callback) {
66
exec('git rev-parse HEAD', function (err, stdout) {
7-
if (err) { callback(err) }
7+
if (err) { return callback(err) }
88
const version = removeEmptyLines(stdout)
99

1010
compilation.assets['COMMITHASH'] = {

lib/write-version-file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var removeEmptyLines = require('./helpers/remove-empty-lines.js')
44
module.exports = function writeVersionFile (compiler) {
55
compiler.plugin('emit', function (compilation, callback) {
66
exec('git describe', function (err, stdout) {
7-
if (err) { callback(err) }
7+
if (err) { return callback(err) }
88
const version = removeEmptyLines(stdout)
99

1010
compilation.assets['VERSION'] = {

0 commit comments

Comments
 (0)