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

fix string query bug

上级 acb562db
......@@ -20,8 +20,8 @@ class Room {
}
}
toString() { return this.id }
toStringEx() { return `Room(${this.obj.name}[${this.id}])` }
toString() { return this.id }
toStringEx() { return `Room(${this.obj.name}[${this.id}])` }
isReady() {
return this.obj.memberList && this.obj.memberList.length
......@@ -178,7 +178,7 @@ class Room {
if (name instanceof RegExp) {
filterFunction = `c => ${name.toString()}.test(c)`
} else if (typeof name === 'string') {
filterFunction = `c => c === ${name}`
filterFunction = `c => c === '${name}'`
} else {
throw new Error('unsupport name type')
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册