diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/webview/recipe.ts | 12 |
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 | ||
46 | import { DEFAULT_APP_SETTINGS } from '../config'; | 46 | import { DEFAULT_APP_SETTINGS } from '../config'; |
47 | import { ifUndefined, safeParseInt } from '../jsUtils'; | 47 | import { cleanseJSObject, ifUndefined, safeParseInt } from '../jsUtils'; |
48 | import { AppStore } from '../@types/stores.types'; | 48 | import { AppStore } from '../@types/stores.types'; |
49 | import Service from '../models/Service'; | 49 | import 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 | ||