From 30ca63d84ccf7fbc378ebf7101f09e10deaf0eaa Mon Sep 17 00:00:00 2001 From: Vijay A Date: Tue, 14 Sep 2021 13:37:47 +0530 Subject: refactor: defensive programming to avoid javascript error for unread badges --- src/webview/lib/RecipeWebview.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/webview/lib') diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index 2bd6bad8d..157da7693 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js @@ -35,12 +35,12 @@ class RecipeWebview { /** * Set the unread message badge * - * @param {int} direct Set the count of direct messages - * eg. Slack direct mentions, or a - * message to @channel - * @param {int} indirect Set a badge that defines there are - * new messages but they do not involve - * me directly to me eg. in a channel + * @param {string | number | undefined | null} direct Set the count of direct messages + * eg. Slack direct mentions, or a + * message to @channel + * @param {string | number | undefined | null} indirect Set a badge that defines there are + * new messages but they do not involve + * me directly to me eg. in a channel */ setBadge(direct = 0, indirect = 0) { this.badgeHandler.setBadge(direct, indirect); -- cgit v1.2.3-70-g09d2