@@ -29,7 +29,11 @@ use_github_labels <- function(delete_default = FALSE,
2929  labels  <-  gh(" GET /repos/:owner/:repo/labels" 
3030
3131  #  Add missing labels
32-   cur_labels  <-  vapply(labels , " [[" " name" FUN.VALUE  =  character (1 ))
32+   if  (identical(labels [[1 ]], " " 
33+     cur_labels  <-  character ()
34+   } else  {
35+     cur_labels  <-  vapply(labels , " [[" " name" FUN.VALUE  =  character (1 ))
36+   }
3337  new_labels  <-  setdiff(names(gh_labels ), cur_labels )
3438  if  (length(new_labels ) >  0 ) {
3539    done(" Adding missing labels: " new_labels )))
@@ -44,7 +48,11 @@ use_github_labels <- function(delete_default = FALSE,
4448  }
4549
4650  #  Correct bad colours
47-   cur_cols  <-  vapply(labels , " [[" " color" FUN.VALUE  =  character (1 ))
51+   if  (identical(labels [[1 ]], " " 
52+     cur_cols  <-  character ()
53+   } else  {
54+     cur_cols  <-  vapply(labels , " [[" " color" FUN.VALUE  =  character (1 ))
55+   }
4856  tru_cols  <-  gh_labels [cur_labels ]
4957  col_labels  <-  cur_labels [! is.na(tru_cols ) &  tru_cols  !=  cur_cols ]
5058
0 commit comments