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.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index a8d9cc1fb..448260638 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -618,7 +618,10 @@ export default class ServicesStore extends Store {
618 const service = this.one(serviceId); 618 const service = this.one(serviceId);
619 619
620 if (service.webview) { 620 if (service.webview) {
621 service.webview.send(channel, args); 621 // Make sure the args are clean, otherwise ElectronJS can't transmit them
622 const cleanArgs = JSON.parse(JSON.stringify(args));
623
624 service.webview.send(channel, cleanArgs);
622 } 625 }
623 } 626 }
624 627
@@ -895,10 +898,14 @@ export default class ServicesStore extends Store {
895 const service = this.one(serviceId); 898 const service = this.one(serviceId);
896 899
897 if (service.webview) { 900 if (service.webview) {
901 // We need to completely clone the object, otherwise Electron won't be able to send the object via IPC
902 const shareWithWebview = JSON.parse(JSON.stringify(service.shareWithWebview));
903
898 debug('Initialize recipe', service.recipe.id, service.name); 904 debug('Initialize recipe', service.recipe.id, service.name);
899 service.webview.send('initialize-recipe', Object.assign({ 905 service.webview.send('initialize-recipe', {
906 ...shareWithWebview,
900 franzVersion: app.getVersion(), 907 franzVersion: app.getVersion(),
901 }, service.shareWithWebview), service.recipe); 908 }, service.recipe);
902 } 909 }
903 } 910 }
904 911