diff options
Diffstat (limited to 'src/webview')
-rw-r--r-- | src/webview/lib/RecipeWebview.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index bb2052107..bef4b78ef 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js | |||
@@ -55,12 +55,12 @@ class RecipeWebview { | |||
55 | const indirectInt = parseInt(indirect, 10); | 55 | const indirectInt = parseInt(indirect, 10); |
56 | 56 | ||
57 | const count = { | 57 | const count = { |
58 | direct: directInt > 0 ? directInt : 0, | 58 | direct: Math.max(directInt, 0), |
59 | indirect: indirectInt > 0 ? indirectInt : 0, | 59 | indirect: Math.max(indirectInt, 0), |
60 | }; | 60 | }; |
61 | 61 | ||
62 | 62 | ||
63 | ipcRenderer.sendToHost('messages', count); | 63 | ipcRenderer.sendToHost('message-counts', count); |
64 | Object.assign(this.countCache, count); | 64 | Object.assign(this.countCache, count); |
65 | 65 | ||
66 | debug('Sending badge count to host', count); | 66 | debug('Sending badge count to host', count); |