Skip to content

Commit

Permalink
fix: use V(graph) as we should
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Jul 17, 2024
1 parent 7e7b00f commit 36fbb08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ vertex.attributes <- function(graph, index = V(graph)) {

if (!missing(index)) {
index_is_natural_sequence <- (length(index) == vcount(graph) &&
identical(index, seq(1, vcount(graph))))
identical(index, V(graph)))
if (!index_is_natural_sequence) {
for (i in seq_along(res)) {
res[[i]] <- res[[i]][index]
Expand Down

0 comments on commit 36fbb08

Please sign in to comment.