fix: LiveQuery can return incorrectly formatted date (#8456)

This commit is contained in:
Daniel
2023-03-06 21:26:06 +11:00
committed by GitHub
parent 6613872ce2
commit 4ce135a4fe
2 changed files with 47 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ import UserRouter from '../Routers/UsersRouter';
import DatabaseController from '../Controllers/DatabaseController';
import { isDeepStrictEqual } from 'util';
import Deprecator from '../Deprecator/Deprecator';
import deepcopy from 'deepcopy';
class ParseLiveQueryServer {
clients: Map;
@@ -496,7 +497,7 @@ class ParseLiveQueryServer {
if (!parseObject) {
return false;
}
return matchesQuery(parseObject, subscription.query);
return matchesQuery(deepcopy(parseObject), subscription.query);
}
async _clearCachedRoles(userId: string) {