Skip to content

Commit 85620b0

Browse files
committed
Calculate path properly when self.parts == [].
1 parent 1ed957b commit 85620b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonpointer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def path(self):
255255
"""
256256
parts = [part.replace('~', '~0') for part in self.parts]
257257
parts = [part.replace('/', '~1') for part in parts]
258-
return '/' + '/'.join(parts)
258+
return ''.join('/' + part for part in parts)
259259

260260
def __eq__(self, other):
261261
""" compares a pointer to another object

0 commit comments

Comments
 (0)