aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/lib
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:29:31 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:49:36 +0530
commit91ebfb1c7dc2ef63be02f614585fdf9fd9ef6773 (patch)
tree510505dbf4f5997f46dc6e0d9cf6ddd61553b548 /src/webview/lib
parent5.6.1-nightly.44 [skip ci] (diff)
downloadferdium-app-91ebfb1c7dc2ef63be02f614585fdf9fd9ef6773.tar.gz
ferdium-app-91ebfb1c7dc2ef63be02f614585fdf9fd9ef6773.tar.zst
ferdium-app-91ebfb1c7dc2ef63be02f614585fdf9fd9ef6773.zip
refactor: expose safeParseInt so that all recipes can use the same for consistent error handling
Diffstat (limited to 'src/webview/lib')
-rw-r--r--src/webview/lib/RecipeWebview.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js
index 96caa125e..2bd6bad8d 100644
--- a/src/webview/lib/RecipeWebview.js
+++ b/src/webview/lib/RecipeWebview.js
@@ -47,6 +47,15 @@ class RecipeWebview {
47 } 47 }
48 48
49 /** 49 /**
50 * Safely parse the given text into an integer
51 *
52 * @param {string | number | undefined | null} text to be parsed
53 */
54 safeParseInt(text) {
55 return this.badgeHandler.safeParseInt(text);
56 }
57
58 /**
50 * Injects the contents of a CSS file into the current webview 59 * Injects the contents of a CSS file into the current webview
51 * 60 *
52 * @param {Array} files CSS files that should be injected. This must 61 * @param {Array} files CSS files that should be injected. This must