im问题修复
This commit is contained in:
@@ -24,6 +24,11 @@ class ImClient {
|
||||
if (this.loginPromise) return this.loginPromise
|
||||
|
||||
if (!this.sdk) {
|
||||
// 兜底:某些时机下 wasm 会先调 window.commonEventFunc 再被 SDK 覆盖,
|
||||
// 提前挂一个空 stub 避免 "window.commonEventFunc is not a function"
|
||||
if (typeof window !== 'undefined' && typeof window.commonEventFunc !== 'function') {
|
||||
window.commonEventFunc = function () {}
|
||||
}
|
||||
this.sdk = getSDK({ coreWasmPath: '/openIM.wasm', debug: false })
|
||||
this._wireEvents()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user