From 2398cc4560bb32a605a0465e8dee3a63daea93a9 Mon Sep 17 00:00:00 2001 From: deepanshkhurana Date: Wed, 12 Jun 2024 17:40:15 +0530 Subject: [PATCH] fix: use inherits instead of class --- app/main.R | 2 +- app/view/mod_app_table.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main.R b/app/main.R index 8578f3b..4adf1dd 100644 --- a/app/main.R +++ b/app/main.R @@ -118,7 +118,7 @@ server <- function(id) { ) } else { - if (class(app_list()) != "data.frame") { + if (!inherits(app_list(), "data.frame")) { empty_state <- renderUI({ generate_empty_state_ui( text = "Oops! Can't read apps from Posit Connect.", diff --git a/app/view/mod_app_table.R b/app/view/mod_app_table.R index fbf93bd..52c6e0c 100644 --- a/app/view/mod_app_table.R +++ b/app/view/mod_app_table.R @@ -43,7 +43,7 @@ server <- function(id, app_list, state) { output$app_table <- renderReactable({ - if (length(app_list) > 0 && class(app_list) == "data.frame") { + if (length(app_list) > 0 && inherits(app_list, "data.frame")) { processed_apps <- app_list %>% select( guid,