Skip to content

Commit b72daab

Browse files
committed
Use JSON for LiveQuery query build
1 parent 9433a2b commit b72daab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/LiveQuery/ParseLiveQueryServer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,10 +1351,10 @@ class ParseLiveQueryServer {
13511351
try {
13521352
const sessionToken = subscriptionInfo.sessionToken || client.sessionToken;
13531353
const parseQuery = new Parse.Query(className);
1354-
1355-
if (query && typeof query === 'object' && query !== null && Object.keys(query).length > 0) {
1356-
parseQuery._where = query;
1357-
}
1354+
parseQuery.withJSON({
1355+
className,
1356+
where: query || {},
1357+
});
13581358

13591359
if (subscriptionInfo.keys && Array.isArray(subscriptionInfo.keys) && subscriptionInfo.keys.length > 0) {
13601360
parseQuery.select(...subscriptionInfo.keys);

0 commit comments

Comments
 (0)