Skip to content

Commit 9668252

Browse files
committed
Make sure this branch is explored only when sensdata is larger
1 parent 8d0526b commit 9668252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/vismodel.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ vismodel <- function(rspecdata,
335335
achromatic <- prepare_userdefined(achromatic)
336336

337337
if (!isTRUE(all.equal(wl, sens_wl, check.attributes = FALSE))) {
338-
if (all(S[!sens_wl %in% wl, ] == 0)) {
338+
if (length(sens_wl) > length(wl) && all(S[!sens_wl %in% wl, ] == 0)) {
339339
S <- S[sens_wl %in% wl, ]
340340
trans <- trans[sens_wl %in% wl]
341341
bkg <- bkg[sens_wl %in% wl]

0 commit comments

Comments
 (0)