Skip to content

Commit

Permalink
fix: fix subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenLiuxt committed Oct 27, 2021
1 parent 9054a35 commit ae07be5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/viteAPI/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ProviderClass {

const subscription = rep;

if (!Object.keys(this.subscriptionList)) {
if (!Object.keys(this.subscriptionList).length) {
this.subscriptionList = {};
this._provider.subscribe && this._provider.subscribe(jsonEvent => {
this.subscribeCallback(jsonEvent);
Expand All @@ -117,7 +117,7 @@ class ProviderClass {


private _offReq(_q) {
delete this.requestList[_q.id];
delete this.requestList[_q._id];
}

private _onReq(type, methods, ...args) {
Expand Down

0 comments on commit ae07be5

Please sign in to comment.