Skip to content

Commit 5e2f14a

Browse files
committed
Fix framing of graphs recursion identification.
1 parent 18707be commit 5e2f14a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/json/ld/frame.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def frame(state, subjects, frame, **options)
8484

8585
# Subject is also the name of a graph
8686
if state[:graphMap].has_key?(id)
87+
log_debug("frame") {"#{id} in graphMap"}
8788
# check frame's "@graph" to see what to do next
8889
# 1. if it doesn't exist and state.graph === "@merged", don't recurse
8990
# 2. if it doesn't exist and state.graph !== "@merged", recurse
@@ -95,7 +96,7 @@ def frame(state, subjects, frame, **options)
9596
recurse, subframe = (state[:graph] != '@merged'), {}
9697
else
9798
subframe = frame['@graph'].first
98-
recurse = !%w(@merged @default).include?(subframe)
99+
recurse = !%w(@merged @default).include?(id)
99100
subframe = {} unless subframe.is_a?(Hash)
100101
end
101102

0 commit comments

Comments
 (0)