Skip to content

Commit

Permalink
Fix compare-by-reference bug in TransformerLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
MMK21Hub committed Aug 14, 2023
1 parent 4bf9688 commit 7e895f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TransformerLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default class TransformerLogger extends EventEmitter {
}

getMessages(...types: MessageType[]) {
return types === []
return types.length === 0
? this.messages
: this.messages.filter(({ type }) => types.includes(type))
}
Expand Down

0 comments on commit 7e895f1

Please sign in to comment.