Skip to content

Commit fda0cce

Browse files
committed
Parse LiveQuery Server. Supporting patterns in classNames.
1 parent 034ea5c commit fda0cce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Controllers/LiveQueryController.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ export class LiveQueryController {
4343
}
4444

4545
hasLiveQuery(className: string): boolean {
46-
return this.classNames.has(className);
46+
for (const name of this.classNames) {
47+
const exp = new RegExp("^" + name + "$");
48+
if (exp.test(className)) {
49+
return true;
50+
}
51+
}
52+
return false;
4753
}
4854

4955
_makePublisherRequest(currentObject: any, originalObject: any, classLevelPermissions: ?any): any {

0 commit comments

Comments
 (0)