diff --git a/.gitignore b/.gitignore index 3f02bb3a..f0137049 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ cover dist docs/_build lib/PyLD.egg-info +.idea diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index 7b52785c..73b76da3 100755 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -3458,6 +3458,8 @@ def _match_frame(self, state, subjects, frame, parent, property): # recurse into graph self._match_frame( state, sorted(state['graphMap'][id_].keys()), [subframe], output, '@graph') + #reset to current graph + state['graph'] = state['graphStack'].pop() # iterate over subject properties in order for prop, objects in sorted(subject.items()):