File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ class Index(JSONPath):
430
430
JSONPath that matches indices of the current datum, or none if not large enough.
431
431
Concrete syntax is brackets.
432
432
433
- WARNING: If the datum is not long enough, it will not crash but will not match anything.
433
+ WARNING: If the datum is None or not long enough, it will not crash but will not match anything.
434
434
NOTE: For the concrete syntax of `[*]`, the abstract syntax is a Slice() with no parameters (equiv to `[:]`
435
435
"""
436
436
@@ -440,7 +440,7 @@ def __init__(self, index):
440
440
def find (self , datum ):
441
441
datum = DatumInContext .wrap (datum )
442
442
443
- if len (datum .value ) > self .index :
443
+ if datum . value and len (datum .value ) > self .index :
444
444
return [DatumInContext (datum .value [self .index ], path = self , context = datum )]
445
445
else :
446
446
return []
You can’t perform that action at this time.
0 commit comments