FS-11279: Wrap verto.clientReady message callback in check for onMessage callback function

The verto.clientReady event calls the onMessage callback function passed in
the Verto object. We should check for the existence of this callback function
before trying to call it.
This commit is contained in:
Chad Phillips 2018-07-26 13:19:45 -05:00 committed by Chris Rienzo
parent fc26aa9785
commit ecdae10548
1 changed files with 3 additions and 1 deletions

View File

@ -613,7 +613,9 @@
break;
case 'verto.clientReady':
verto.callbacks.onMessage(verto, null, $.verto.enum.message.clientReady, data.params);
if (verto.callbacks.onMessage) {
verto.callbacks.onMessage(verto, null, $.verto.enum.message.clientReady, data.params);
}
console.debug("CLIENT READY", data.params);
break;