diff options
author | Amine Mouafik <amine@mouafik.fr> | 2019-09-19 17:55:37 +0700 |
---|---|---|
committer | Amine Mouafik <amine@mouafik.fr> | 2019-09-19 17:55:37 +0700 |
commit | 62662dc5f547cb19f5493e4459e8ee4e9480cf4e (patch) | |
tree | 6e2d64b47e3a060b8e5e7de8f2d19b7d27fb22e8 /src/webview/lib/RecipeWebview.js | |
parent | Fix notarization condition to target only tags builds (diff) | |
parent | #53 Remove Travis artifacts upload to S3 (diff) | |
download | ferdium-app-62662dc5f547cb19f5493e4459e8ee4e9480cf4e.tar.gz ferdium-app-62662dc5f547cb19f5493e4459e8ee4e9480cf4e.tar.zst ferdium-app-62662dc5f547cb19f5493e4459e8ee4e9480cf4e.zip |
Merge branch 'master' into feat/macos-signing
# Conflicts:
# package-lock.json
Diffstat (limited to 'src/webview/lib/RecipeWebview.js')
-rw-r--r-- | src/webview/lib/RecipeWebview.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index be29142af..877e45e35 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js | |||
@@ -39,9 +39,15 @@ class RecipeWebview { | |||
39 | if (this.countCache.direct === direct | 39 | if (this.countCache.direct === direct |
40 | && this.countCache.indirect === indirect) return; | 40 | && this.countCache.indirect === indirect) return; |
41 | 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, 10); | ||
46 | const indirectInt = parseInt(indirect, 10); | ||
47 | |||
42 | const count = { | 48 | const count = { |
43 | direct: direct > 0 ? direct : 0, | 49 | direct: directInt > 0 ? directInt : 0, |
44 | indirect: indirect > 0 ? indirect : 0, | 50 | indirect: indirectInt > 0 ? indirectInt : 0, |
45 | }; | 51 | }; |
46 | 52 | ||
47 | ipcRenderer.sendToHost('messages', count); | 53 | ipcRenderer.sendToHost('messages', count); |