summaryrefslogtreecommitdiffstats
path: root/src/webview
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview')
-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