Commit a8b6a936 by zhousil

解决控制台报错

parent b707d4d5
Showing with 2 additions and 2 deletions
...@@ -60,7 +60,7 @@ class ChatCacheDatabaseController { ...@@ -60,7 +60,7 @@ class ChatCacheDatabaseController {
// eslint-disable-next-line @typescript-eslint/no-this-alias // eslint-disable-next-line @typescript-eslint/no-this-alias
const that = this; const that = this;
const setupDb = () => { const setupDb = () => {
const db = that.messageDatabases.get(k); const db = that.messageDatabases.get(k) as IDBDatabase;
try { try {
that.buildTables(db, this.chatMessageKey, "id"); that.buildTables(db, this.chatMessageKey, "id");
} catch (e) { } catch (e) {
...@@ -127,7 +127,7 @@ class ChatCacheDatabaseController { ...@@ -127,7 +127,7 @@ class ChatCacheDatabaseController {
t.onsuccess = (r) => { t.onsuccess = (r) => {
const chat = (r.target as any).result as Chat; const chat = (r.target as any).result as Chat;
if (chat) { if (chat) {
chat.eid = p.eid; chat.eid = p.eid as string;
p.ts && (chat.last_msg_ts = p.ts); p.ts && (chat.last_msg_ts = p.ts);
p.eid && (chat.last_msg_sender = p.eid); p.eid && (chat.last_msg_sender = p.eid);
p.type && (chat.last_msg_type = p.type); p.type && (chat.last_msg_type = p.type);
......
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