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

check duplicated wechaty-puppet module installed (#1930)

上级 dbe23c5f
......@@ -48,6 +48,14 @@ export class PuppetManager {
*/
if (options.puppet instanceof Puppet) {
puppetInstance = await this.resolveInstance(options.puppet)
} else if (typeof options.puppet !== 'string') {
log.error('PuppetManager', 'resolve() %s',
`
Wechaty Framework must keep only one Puppet instance #1930
See: https://github.com/wechaty/wechaty/issues/1930
`,
)
throw new Error('Wechaty Framework must keep only one Puppet instance #1930')
} else {
const MyPuppet = await this.resolveName(options.puppet)
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册