Skip to content

Empty code editor on the Data Page will crash the app #31

@stevechoy

Description

@stevechoy

If the placeholder code filter() %>% mutate() is deleted by the user and then the "Apply" button is pressed, the app will crash.

This is due to the logic inside the safely_nmdata_code reactive, where the entire code string (input$codes) is parsed indiscriminately:

nmdata_global     <<- nmdata() # globally assigned as shinyAce editor is not scoped to access this environment
parsed_text <- safely_parse(text = paste('nmdata_global <<- nmdata_global %>% ', input$codes))

Ideally, there should be a check to prevent the app from crashing, but a straightforward solution is not apparent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions