Skip to content

Commit

Permalink
Force js code to be a character
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke authored Nov 29, 2022
1 parent ed38d82 commit cd13c98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/chromote-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ chromote_eval <- function(
allow_no_response = FALSE # Allows for `awaitPromise` and `returnByValue` to be `FALSE`. No function should use this except for: `$run_js()`
) {
assert_chromote_session(chromote_session)
js <- as.character(js) # {glue} support
checkmate::assert_character(js, any.missing = FALSE, len = 1)
if (isTRUE(allow_no_response)) {
checkmate::assert_false(awaitPromise)
Expand Down Expand Up @@ -91,6 +92,7 @@ chromote_wait_for_condition <- function(
interval = 100
) {
ellipsis::check_dots_empty()
condition_js <- as.character(condition_js) # {glue} support
checkmate::assert_character(condition_js, any.missing = FALSE, len = 1)
checkmate::assert_number(timeout, lower = 0)
checkmate::assert_number(interval, lower = 0)
Expand Down

0 comments on commit cd13c98

Please sign in to comment.