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

fix `profile` null bug

上级 122d0373
......@@ -57,9 +57,11 @@ class Wechaty extends EventEmitter {
// setting.port = setting.port || Config.port
setting.profile = setting.profile || Config.profile // no profile, no session save/restore
setting.profile = /\.wechaty\.json$/i.test(setting.profile)
if (setting.profile) {
setting.profile = /\.wechaty\.json$/i.test(setting.profile)
? setting.profile
: setting.profile + '.wechaty.json'
}
this.npmVersion = require('../package.json').version
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册