Skip to content

Commit d994dd7

Browse files
author
benholloway
committed
solved repeated duplicated error messages when apps that share code that is erroneous
1 parent eea517a commit d994dd7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/build/browserify.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function create(opt) {
6666
getInstance(file.path)
6767
.bundle(this, file.relative)
6868
.catch(function onError(errors) {
69-
messages.push.apply(messages, errors);
69+
errors.forEach(addMessageUnique);
7070
})
7171
.finally(done);
7272
}
@@ -76,6 +76,12 @@ function create(opt) {
7676
done();
7777
}
7878

79+
function addMessageUnique(message) {
80+
if (messages.indexOf(message) < 0) {
81+
messages.push(message);
82+
}
83+
}
84+
7985
return through.obj(transform, flush);
8086
}
8187

0 commit comments

Comments
 (0)