File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ class Index(JSONPath):
430430 JSONPath that matches indices of the current datum, or none if not large enough.
431431 Concrete syntax is brackets.
432432
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.
434434 NOTE: For the concrete syntax of `[*]`, the abstract syntax is a Slice() with no parameters (equiv to `[:]`
435435 """
436436
@@ -440,7 +440,7 @@ def __init__(self, index):
440440 def find (self , datum ):
441441 datum = DatumInContext .wrap (datum )
442442
443- if len (datum .value ) > self .index :
443+ if datum . value and len (datum .value ) > self .index :
444444 return [DatumInContext (datum .value [self .index ], path = self , context = datum )]
445445 else :
446446 return []
You can’t perform that action at this time.
0 commit comments