rstudio/shiny — pull request #424 by jmcphers (2014-03-20 23:10:34+00:00)
Title: Handle zero-argument outputs gracefully

The Shiny output assignment currently assumes that the assignment will have the form

output$foo <- bar({ expr })

and attempts to read source references from `{ expr }` for appropriate labeling in the reactive graph/Showcase mode. However, there's no guarantee that the right-hand side of the assignment has these characteristics, and when it doesn't a runtime error occurs.

This change does the minimum required to deal gracefully with the situation wherein outputs are assigned to zero-argument functions, or where the expressions don't have source references.

(If more esoteric assignments are possible we might want to check more specifically to ensure that the RHS is a call with arguments.)