fix setting comment on undefined msgs (#78)

main
Robbe Derks 2022-02-14 15:55:27 +01:00 committed by GitHub
parent a992fdedf4
commit 976c1652ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -450,6 +450,12 @@ export default class DBC {
let [messageId, comment] = matches.slice(1);
messageId = parseInt(messageId, 10);
const msg = messages.get(messageId);
if (msg === undefined) {
warnings.push(
`failed to find message to add comment to, msg id: ${messageId}`
);
continue;
}
msg.comment = comment;
if (hasFollowUp) {