aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index c8042e9de..3f551eddb 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -16,6 +16,7 @@ import {
16} from '../helpers/recipe-helpers'; 16} from '../helpers/recipe-helpers';
17import { workspaceStore } from '../features/workspaces'; 17import { workspaceStore } from '../features/workspaces';
18import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config'; 18import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config';
19import { cleanseJSObject } from '../jsUtils';
19import { SPELLCHECKER_LOCALES } from '../i18n/languages'; 20import { SPELLCHECKER_LOCALES } from '../i18n/languages';
20import { ferdiumVersion } from '../environment-remote'; 21import { ferdiumVersion } from '../environment-remote';
21 22
@@ -861,7 +862,7 @@ export default class ServicesStore extends Store {
861 const service = this.one(serviceId); 862 const service = this.one(serviceId);
862 863
863 // Make sure the args are clean, otherwise ElectronJS can't transmit them 864 // Make sure the args are clean, otherwise ElectronJS can't transmit them
864 const cleanArgs = JSON.parse(JSON.stringify(args)); 865 const cleanArgs = cleanseJSObject(args);
865 866
866 if (service.webview) { 867 if (service.webview) {
867 service.webview.send(channel, cleanArgs); 868 service.webview.send(channel, cleanArgs);
@@ -1273,9 +1274,7 @@ export default class ServicesStore extends Store {
1273 1274
1274 if (service.webview) { 1275 if (service.webview) {
1275 // We need to completely clone the object, otherwise Electron won't be able to send the object via IPC 1276 // We need to completely clone the object, otherwise Electron won't be able to send the object via IPC
1276 const shareWithWebview = JSON.parse( 1277 const shareWithWebview = cleanseJSObject(service.shareWithWebview);
1277 JSON.stringify(service.shareWithWebview),
1278 );
1279 1278
1280 debug('Initialize recipe', service.recipe.id, service.name); 1279 debug('Initialize recipe', service.recipe.id, service.name);
1281 service.webview.send( 1280 service.webview.send(