10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81ae489 commit 7566ccdCopy full SHA for 7566ccd
src/webview/lib/RecipeWebview.js
@@ -39,9 +39,15 @@ class RecipeWebview {
39
if (this.countCache.direct === direct
40
&& this.countCache.indirect === indirect) return;
41
42
+ // Parse number to integer
43
+ // This will correct errors that recipes may introduce, e.g.
44
+ // by sending a String instead of an integer
45
+ const directInt = parseInt(direct);
46
+ const indirectInt = parseInt(indirect);
47
+
48
const count = {
- direct: direct > 0 ? direct : 0,
- indirect: indirect > 0 ? indirect : 0,
49
+ direct: directInt > 0 ? directInt : 0,
50
+ indirect: indirectInt > 0 ? indirectInt : 0,
51
};
52
53
ipcRenderer.sendToHost('messages', count);
0 commit comments