as_tdata: Downgrade teal_data objects in modules for compatibility
Description
Convert teal_data to tdata in teal modules.
Usage
as_tdata(x)
Value
Object of class tdata.
Arguments
x
data object, either tdata or teal_data, the latter possibly in a reactive expression
Details
Recent changes in teal cause modules to fail because modules expect a tdata object
to be passed to the data argument but instead they receive a teal_data object,
which is additionally wrapped in a reactive expression in the server functions.
In order to easily adapt such modules without a proper refactor,
use this function to downgrade the data argument.