Skip to content

Commit

Permalink
Fix unread count parsing from page title.
Browse files Browse the repository at this point in the history
Fixes zulip#1157

Signed-off-by: Anders Kaseorg <anders@zulip.com>
  • Loading branch information
andersk committed Oct 27, 2021
1 parent add43ba commit 377f08a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/renderer/js/components/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default class WebView {
}

getBadgeCount(title: string): number {
const messageCountInTitle = /\((\d+)\)/.exec(title);
const messageCountInTitle = /^\((\d+)\)/.exec(title);
return messageCountInTitle ? Number(messageCountInTitle[1]) : 0;
}

Expand Down

0 comments on commit 377f08a

Please sign in to comment.