aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2024-02-17 15:27:03 +0000
committerLibravatar GitHub <noreply@github.com>2024-02-17 20:57:03 +0530
commit5705d58f2d7f53c3e79dc10464c13620a317c9b9 (patch)
treef89c836ac7c494a0383c7a7d459145ab04aff2ea
parentupgrade node to 20.11.1 and other minor versions for pkgs (diff)
downloadferdium-app-5705d58f2d7f53c3e79dc10464c13620a317c9b9.tar.gz
ferdium-app-5705d58f2d7f53c3e79dc10464c13620a317c9b9.tar.zst
ferdium-app-5705d58f2d7f53c3e79dc10464c13620a317c9b9.zip
chore: fix notification "option" clone (#1580)
-rw-r--r--src/webview/recipe.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/webview/recipe.ts b/src/webview/recipe.ts
index f2a13f224..148ea6fab 100644
--- a/src/webview/recipe.ts
+++ b/src/webview/recipe.ts
@@ -44,7 +44,7 @@ import {
44} from './spellchecker'; 44} from './spellchecker';
45 45
46import { DEFAULT_APP_SETTINGS } from '../config'; 46import { DEFAULT_APP_SETTINGS } from '../config';
47import { ifUndefined, safeParseInt } from '../jsUtils'; 47import { cleanseJSObject, ifUndefined, safeParseInt } from '../jsUtils';
48import { AppStore } from '../@types/stores.types'; 48import { AppStore } from '../@types/stores.types';
49import Service from '../models/Service'; 49import Service from '../models/Service';
50 50
@@ -124,8 +124,14 @@ contextBridge.exposeInMainWorld('ferdium', {
124 safeParseInt(text), 124 safeParseInt(text),
125 setDialogTitle: (title: string | null | undefined) => 125 setDialogTitle: (title: string | null | undefined) =>
126 dialogTitleHandler.setDialogTitle(title), 126 dialogTitleHandler.setDialogTitle(title),
127 displayNotification: (title: string, options: any) => 127 displayNotification: (title: string, options: any) => {
128 notificationsHandler.displayNotification(title, options), 128 notificationsHandler.displayNotification(
129 title,
130 // The following line is needed so that a proper clone of the "options" object is made.
131 // This line was causing issues with some services.
132 cleanseJSObject(options),
133 );
134 },
129 getDisplayMediaSelector, 135 getDisplayMediaSelector,
130}); 136});
131 137