Skip to content

Commit

Permalink
init: only define GRAPE variables when undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson authored and james-d-mitchell committed Feb 17, 2021
1 parent 0fecc53 commit e097454
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion init.g
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ fi;
BindGlobal("DIGRAPHS_IsGrapeLoaded",
IsPackageMarkedForLoading("grape", "4.8.1"));

if not DIGRAPHS_IsGrapeLoaded then
# To avoid warnings when GRAPE is not loaded
if not IsBound(IsGraph) then
IsGraph := ReturnFalse;
fi;
if not IsBound(Vertices) then
Vertices := IdFunc;
fi;
if not IsBound(Adjacency) then
Adjacency := IdFunc;
fi;

Expand Down

0 comments on commit e097454

Please sign in to comment.