Test for boolean result before unsubscribe
This commit is contained in:
parent
8f9fdb350c
commit
1b0945940b
@ -325,7 +325,7 @@ export default class Contract {
|
||||
console.warn('_sendData', subscriptionId, error);
|
||||
}
|
||||
|
||||
if (autoRemove && !result) {
|
||||
if (autoRemove && !result && typeof result === 'boolean') {
|
||||
this.unsubscribe(subscriptionId);
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ export default class Manager {
|
||||
console.error(`Unable to update callback for subscriptionId ${subscriptionId}`, error);
|
||||
}
|
||||
|
||||
if (autoRemove && !result) {
|
||||
if (autoRemove && !result && typeof result === 'boolean') {
|
||||
this.unsubscribe(subscriptionId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user