mirror of
https://github.com/msberends/AMR.git
synced 2026-05-14 05:10:46 +02:00
Fix candidates_formatted not found in print.mo_uncertainties()
When there is only one match (candidates field is empty), the "Also matched:" block must be skipped. Wrapping it in if (candidates != "") prevents the error that arose after #288 narrowed filtr to one entry. https://claude.ai/code/session_01VH4Ju4Xq9aW1AHuoVbjGEo
This commit is contained in:
2
R/mo.R
2
R/mo.R
@@ -1023,6 +1023,7 @@ print.mo_uncertainties <- function(x, n = 10, ...) {
|
||||
message_(out2, as_note = FALSE)
|
||||
}
|
||||
|
||||
if (x[i, ]$candidates != "") {
|
||||
other_matches <- paste0(
|
||||
"Also matched: ",
|
||||
vector_and(
|
||||
@@ -1035,6 +1036,7 @@ print.mo_uncertainties <- function(x, n = 10, ...) {
|
||||
)
|
||||
message_(other_matches, as_note = FALSE)
|
||||
}
|
||||
}
|
||||
|
||||
if (isTRUE(any_maxed_out)) {
|
||||
cat("\n")
|
||||
|
||||
Reference in New Issue
Block a user