diff --git a/js/msg.js b/js/msg.js index b5a655d5..6e4f0d20 100644 --- a/js/msg.js +++ b/js/msg.js @@ -293,6 +293,9 @@ const msg = (() => { // {type, error, data, id} function unwrapData(result) { + if (result === undefined) { + throw new Error('Receiving end does not exist'); + } if (result.type === 'exchange') { const pending = exchangeGet(result); if (pending) {