Skip to content

Commit

Permalink
remove returns
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchultheis committed Mar 17, 2021
1 parent 7aea22d commit e281aef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wilson-basic/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ server <- function(session, input, output) {
shiny::req(input$data_origin)

if (input$data_origin == "Select from list") {
return(selectizeInput(inputId = "fileLoader", label = "Select data set", choices = load, selected = input$fileLoader))
selectizeInput(inputId = "fileLoader", label = "Select data set", choices = load, selected = input$fileLoader)
} else if (input$data_origin == "Upload file") {
return(fileInput(inputId = "fileLoader2", label = "Upload clarion file", accept = c(".se", ".clarion")))
fileInput(inputId = "fileLoader2", label = "Upload clarion file", accept = c(".se", ".clarion"))
}
})

Expand All @@ -572,17 +572,17 @@ server <- function(session, input, output) {
# returns filepath
file_path <- eventReactive({
if (isTruthy(input$fileLoader) && input$data_origin == "Select from list") {
return(TRUE)
TRUE
} else if (isTruthy(input$fileLoader2$datapath) && input$data_origin == "Upload file" && input$fileLoader2$datapath != isolate(last_upload())) {
last_upload(input$fileLoader2$datapath)

return(TRUE)
TRUE
}
}, {
if (input$data_origin == "Select from list") {
shiny::req(input$fileLoader)

return(list(path = input$fileLoader, name = input$fileLoader))
list(path = input$fileLoader, name = input$fileLoader)
} else if (input$data_origin == "Upload file") {
shiny::req(input$fileLoader2$datapath)

Expand All @@ -593,7 +593,7 @@ server <- function(session, input, output) {
file.copy(from = input$fileLoader2$datapath, to = file.path("logs", paste(session$token, date, input$fileLoader2$name, sep = "_")))
}

return(list(path = input$fileLoader2$datapath, name = input$fileLoader2$name))
list(path = input$fileLoader2$datapath, name = input$fileLoader2$name)
}
})

Expand Down

0 comments on commit e281aef

Please sign in to comment.