Skip to content

Commit b26971a

Browse files
committed
correct the case where no stack trace is found
1 parent f7c9b2d commit b26971a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plugins/default/DuplicateCheckerPlugin.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ export class DuplicateCheckerPlugin implements IEventPlugin {
2828
let hashCode = 0;
2929

3030
while (error) {
31-
if (error.stack_trace && error.stack_trace.length) {
32-
hashCode += (hashCode * 397) ^ Utils.getHashCode(error.message);
31+
hashCode += (hashCode * 397) ^ Utils.getHashCode(error.message);
32+
33+
if (error.stack_trace && error.stack_trace.length) {
3334
hashCode += (hashCode * 397) ^ Utils.getHashCode(JSON.stringify(error.stack_trace));
3435
}
3536
error = error.inner;

0 commit comments

Comments
 (0)