Skip to content

Commit 7419dfc

Browse files
committed
test for nzchar rather than !is.null
1 parent f7e1024 commit 7419dfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/Attributes.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,8 @@ sourceCppFunction <- function(func, isVoid, dll, symbol) {
10451045
if (length(cache) > 0) {
10461046
for (i in 1:length(cache)) {
10471047
entry <- cache[[i]]
1048-
if ((!is.null(file) && identical(file, entry$file)) ||
1049-
(!is.null(code) && identical(code, entry$code))) {
1048+
if ((nzchar(file) && identical(file, entry$file)) ||
1049+
(nzchar(code) && identical(code, entry$code))) {
10501050
return(i)
10511051
}
10521052
}

0 commit comments

Comments
 (0)