Skip to content

Commit d969324

Browse files
committed
serialize all messages sent to plugins
1 parent 70f493b commit d969324

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/selenium-ide/src/plugin/communication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Manager from './manager'
2222

2323
export function sendMessage(id, payload) {
2424
return browser.runtime
25-
.sendMessage(id, payload)
25+
.sendMessage(id, JSON.parse(JSON.stringify(payload)))
2626
.then(response => {
2727
if (response === undefined || response === null) {
2828
return Promise.reject(

packages/selenium-ide/src/plugin/manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class PluginManager {
114114
entity: 'project',
115115
project,
116116
})
117-
.catch(() => false)
117+
.catch(() => ({ canEmit: false }))
118118
.then(({ canEmit }) => {
119119
plugin.canEmit = canEmit
120120
return plugin

0 commit comments

Comments
 (0)