Fix: throw receiving end doesn't exist message
This commit is contained in:
parent
f0c0bc4d6a
commit
04c2d6bbf6
|
@ -293,6 +293,9 @@ const msg = (() => {
|
||||||
|
|
||||||
// {type, error, data, id}
|
// {type, error, data, id}
|
||||||
function unwrapData(result) {
|
function unwrapData(result) {
|
||||||
|
if (result === undefined) {
|
||||||
|
throw new Error('Receiving end does not exist');
|
||||||
|
}
|
||||||
if (result.type === 'exchange') {
|
if (result.type === 'exchange') {
|
||||||
const pending = exchangeGet(result);
|
const pending = exchangeGet(result);
|
||||||
if (pending) {
|
if (pending) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user