Skip to content

Commit 3d950ab

Browse files
committed
Update LiveQueryClient.ts
1 parent 7000301 commit 3d950ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/LiveQueryClient.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,12 @@ class LiveQueryClient {
430430
}
431431
case OP_EVENTS.RESULT: {
432432
if (subscription) {
433-
const objects = data.results.map(json => ParseObject.fromJSON(json, false));
433+
const objects = data.results.map(json => {
434+
if (!json.className && subscription.query) {
435+
json.className = subscription.query.className;
436+
}
437+
return ParseObject.fromJSON(json, false);
438+
});
434439
subscription.emit(SUBSCRIPTION_EMMITER_TYPES.RESULT, objects);
435440
}
436441
break;

0 commit comments

Comments
 (0)