Skip to content

Commit

Permalink
treat empty string as no token
Browse files Browse the repository at this point in the history
* to make life easier for the connection pane
  • Loading branch information
jefferis committed Sep 27, 2024
1 parent 5b701d6 commit 6d54d60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/conn.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ neuprint_connection <- function(server=NULL, token=NULL, dataset=NULL,
# we will always add one in our calls
neuprint_server <- remove_trailing_slash(neuprint_server)
# Set a default token if none specified
neuprint_token <- if(is.null(token)) unlist(getenvoroption("token")) else token
neuprint_token <- if(is.null(token) || !nzchar(token)) unlist(getenvoroption("token")) else token
# collect any curl options defined as environment variables
config=neuprint_curl_options(config)
conn=list(server = neuprint_server, token = neuprint_token, config=config,
Expand Down

0 comments on commit 6d54d60

Please sign in to comment.