diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2024-02-17 15:27:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 20:57:03 +0530 |
commit | 5705d58f2d7f53c3e79dc10464c13620a317c9b9 (patch) | |
tree | f89c836ac7c494a0383c7a7d459145ab04aff2ea | |
parent | upgrade node to 20.11.1 and other minor versions for pkgs (diff) | |
download | ferdium-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.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 | ||