Commit 51763f55 by 杨铁龙

适配小程序

parent baa3d07f
Showing with 6 additions and 1 deletions
...@@ -485,6 +485,8 @@ class ChatCacheDatabaseController { ...@@ -485,6 +485,8 @@ class ChatCacheDatabaseController {
!removing.length && resolve(); !removing.length && resolve();
}); });
} else {
resolve();
} }
}); });
} }
......
...@@ -58,7 +58,10 @@ class Chat { ...@@ -58,7 +58,10 @@ class Chat {
option.message && (this.messageController = option.message); option.message && (this.messageController = option.message);
option.avatar !== undefined && (this.defaultAvatar = option.avatar); option.avatar !== undefined && (this.defaultAvatar = option.avatar);
await this.setupIndexDb(option.orgId()); await this.setupIndexDb(option.orgId()).catch(err => {
// 必须catch error不然小程序不会向后运行
console.error("setupIndexDb Error")
});
this.token = async () => option.sdk().global.jwtToken; this.token = async () => option.sdk().global.jwtToken;
tokenManager.save(this.token); tokenManager.save(this.token);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment