fix: allow LiveQuery on Parse.Session (#7554)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ParseCloudCodePublisher } from '../LiveQuery/ParseCloudCodePublisher';
|
||||
import { LiveQueryOptions } from '../Options';
|
||||
import { getClassName } from './../triggers';
|
||||
export class LiveQueryController {
|
||||
classNames: any;
|
||||
liveQueryPublisher: any;
|
||||
@@ -9,7 +10,10 @@ export class LiveQueryController {
|
||||
if (!config || !config.classNames) {
|
||||
this.classNames = new Set();
|
||||
} else if (config.classNames instanceof Array) {
|
||||
const classNames = config.classNames.map(name => new RegExp('^' + name + '$'));
|
||||
const classNames = config.classNames.map(name => {
|
||||
const _name = getClassName(name);
|
||||
return new RegExp(`^${_name}$`);
|
||||
});
|
||||
this.classNames = new Set(classNames);
|
||||
} else {
|
||||
throw 'liveQuery.classes should be an array of string';
|
||||
|
||||
Reference in New Issue
Block a user