Skip to content

Commit e8fbd18

Browse files
mithrandistefankoegl
authored andcommitted
Avoid double work (stefankoegl#62)
In the case where the optimized patch is not invalid, we shouldn't need to calculate the patch again.
1 parent 18887df commit e8fbd18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonpatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def make_patch(src, dst):
179179
if new != dst:
180180
return JsonPatch.from_diff(src, dst, False)
181181

182-
return JsonPatch.from_diff(src, dst)
182+
return patch
183183

184184

185185
class JsonPatch(object):

0 commit comments

Comments
 (0)