Skip to content

Commit

Permalink
FIX Ensure message events are handled correctly (#1724)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Apr 17, 2024
1 parent 3a2b82a commit 494203e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion client/src/legacy/LeftAndMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,15 @@ $.entwine('ss', function($) {
// Determine action
switch(data.type) {
case 'event':
target.trigger(data.event, data.data);
let eventType = data.event;
let eventData = data.data;
if (!eventType) {
eventType = data.message.type;
}
if (!eventData) {
eventData = data.message.payload;
}
target.trigger(eventType, eventData);
break;
case 'callback':
target[data.callback].call(target, data.data);
Expand Down

0 comments on commit 494203e

Please sign in to comment.