Skip to content

Commit e67d014

Browse files
committed
Use JSON for LiveQuery query build
1 parent 60a2955 commit e67d014

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
@@ -1377,10 +1377,10 @@ class ParseLiveQueryServer {
13771377
try {
13781378
const sessionToken = subscriptionInfo.sessionToken || client.sessionToken;
13791379
const parseQuery = new Parse.Query(className);
1380-
1381-
if (query && typeof query === 'object' && query !== null && Object.keys(query).length > 0) {
1382-
parseQuery._where = query;
1383-
}
1380+
parseQuery.withJSON({
1381+
className,
1382+
where: query || {},
1383+
});
13841384

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

0 commit comments

Comments
 (0)