Skip to content

Commit

Permalink
fix error (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo authored Jan 30, 2025
1 parent c18b6a5 commit 44b2b9c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/teal_reporter.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ TealReportCard <- R6::R6Class( # nolint: object_name.
),
private = list(
dispatch_block = function(block_class) {
eval(str2lang(block_class))
if (exists(block_class, getNamespace("teal"))) {
# for block classes which are in teal (TealSlicesBlock)
get(block_class)
} else {
# other block classes are in teal.reporter so we need to use super (ReporterCard) class
super$dispatch_block(block_class)
}
}
)
)
Expand Down

0 comments on commit 44b2b9c

Please sign in to comment.