From 22d247209501c8b808a80b7c6e1b3da7c796fce3 Mon Sep 17 00:00:00 2001 From: Roberto Polli Date: Wed, 29 Jun 2022 17:47:52 +0200 Subject: [PATCH] Fix: #163. IndexError when matching values. --- lib/pyld/jsonld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index 49d6212..5c7e996 100644 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -4504,7 +4504,7 @@ def _value_match(self, pattern, value): if not v2 and not t2 and not l2: return True - if not (v1 in v2 or _is_empty_object(v2[0])): + if not (v1 in v2 or not v2 or _is_empty_object(v2[0])): return False if not ((not t1 and not t2) or (t1 in t2) or (t1 and t2 and _is_empty_object(t2[0]))): return False