mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
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:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user