Fix unread count parsing from page title.

Fixes #1157

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-10-27 16:41:18 -07:00
parent add43bafda
commit 377f08ad5d

View File

@@ -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;
}