Skip to content

Commit

Permalink
Use inherits() instead of if(class(x)==y)
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jul 19, 2022
1 parent cd95e05 commit 4441945
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ argsForServerFunc <- function(serverFunc, session) {
getEffectiveBody <- function(func) {
if (is.null(func))
NULL
else if (isS4(func) && class(func) == "functionWithTrace")
else if (isS4(func) && inherits(func, "functionWithTrace"))
body(func@original)
else
body(func)
Expand Down

0 comments on commit 4441945

Please sign in to comment.