Skip to content

Commit

Permalink
fix(#53): entry check should contain itself
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Jul 27, 2023
1 parent 2b63eb5 commit 7e59635
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion graph/file/api_query_ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ func (fg *Graph) TransitiveReferenceIds(f *Vertex) []string {

func (fg *Graph) EntryIds(f *Vertex) []string {
ret := make([]string, 0)
all := fg.TransitiveReferencedIds(f)
// and also itself
all := append(fg.TransitiveReferencedIds(f), f.Id())
for _, eachId := range all {
item := fg.IdCache[eachId]
if item.ContainTag(TagEntry) {
Expand Down
3 changes: 2 additions & 1 deletion graph/function/api_query_ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ func (fg *Graph) TransitiveReferenceIds(f *Vertex) []string {

func (fg *Graph) EntryIds(f *Vertex) []string {
ret := make([]string, 0)
all := fg.TransitiveReferencedIds(f)
// and also itself
all := append(fg.TransitiveReferencedIds(f), f.Id())
for _, eachId := range all {
item := fg.IdCache[eachId]
if item.ContainTag(TagEntry) {
Expand Down

0 comments on commit 7e59635

Please sign in to comment.