Skip to content

Commit e097454

Browse files
wilfwilsonjames-d-mitchell
authored andcommitted
init: only define GRAPE variables when undefined
1 parent 0fecc53 commit e097454

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

init.g

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ fi;
2727
BindGlobal("DIGRAPHS_IsGrapeLoaded",
2828
IsPackageMarkedForLoading("grape", "4.8.1"));
2929

30-
if not DIGRAPHS_IsGrapeLoaded then
30+
# To avoid warnings when GRAPE is not loaded
31+
if not IsBound(IsGraph) then
3132
IsGraph := ReturnFalse;
33+
fi;
34+
if not IsBound(Vertices) then
3235
Vertices := IdFunc;
36+
fi;
37+
if not IsBound(Adjacency) then
3338
Adjacency := IdFunc;
3439
fi;
3540

0 commit comments

Comments
 (0)