The message object may be exactly false (or a falsy value), in which case shiny will fail to send the message to the handler. Use .hasOwnProperty() instead.

This commit is contained in:
Yihui Xie
2015-08-21 16:09:25 -05:00
parent 168f5e32af
commit 58f8b482f5

View File

@@ -396,7 +396,7 @@ var ShinyApp = function() {
for (var i = 0; i < handlerOrder.length; i++) {
var msgType = handlerOrder[i];
if (msgObj[msgType]) {
if (msgObj.hasOwnProperty(msgType)) {
// Execute each handler with 'this' referring to the present value of
// 'this'
handlers[msgType].call(this, msgObj[msgType]);