Skip to content

Commit 5c23e15

Browse files
author
percypyan
committed
Remove updade of message and use res.event instead
This prevent computing function name from a incorrect event if multiple subscriptions override one by one the message.event.
1 parent 5518b92 commit 5c23e15

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/LiveQuery/ParseLiveQueryServer.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ class ParseLiveQueryServer {
298298
} else {
299299
return null;
300300
}
301-
message.event = type;
302301
res = {
303302
event: type,
304303
sessionToken: client.sessionToken,
@@ -334,8 +333,7 @@ class ParseLiveQueryServer {
334333
originalParseObject = res.original.toJSON();
335334
originalParseObject.className = res.original.className || className;
336335
}
337-
const functionName =
338-
'push' + message.event.charAt(0).toUpperCase() + message.event.slice(1);
336+
const functionName = 'push' + res.event.charAt(0).toUpperCase() + res.event.slice(1);
339337
if (client[functionName]) {
340338
client[functionName](requestId, currentParseObject, originalParseObject);
341339
}

0 commit comments

Comments
 (0)