提交 eaf00b06 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

fix the order of set global puppet instance

上级 717f7d29
......@@ -215,9 +215,6 @@ export class Wechaty extends EventEmitter implements Sayable {
this.profile.load()
this.puppet = await this.initPuppet()
// set puppet instance to Wechaty Static variable, for using by Contact/Room/Message/FriendRequest etc.
config.puppetInstance(this.puppet)
} catch (e) {
log.error('Wechaty', 'start() exception: %s', e && e.message)
Raven.captureException(e)
......@@ -410,6 +407,8 @@ export class Wechaty extends EventEmitter implements Sayable {
})
}
// set puppet instance to Wechaty Static variable, for using by Contact/Room/Message/FriendRequest etc.
config.puppetInstance(this.puppet)
await puppet.init()
return puppet
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册