From ecdae10548188f23a59529497e040abeb9a2e6f8 Mon Sep 17 00:00:00 2001 From: Chad Phillips Date: Thu, 26 Jul 2018 13:19:45 -0500 Subject: [PATCH] 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. --- html5/verto/js/src/jquery.verto.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html5/verto/js/src/jquery.verto.js b/html5/verto/js/src/jquery.verto.js index a2e02e4bdc..7e19c90343 100644 --- a/html5/verto/js/src/jquery.verto.js +++ b/html5/verto/js/src/jquery.verto.js @@ -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;