-
Notifications
You must be signed in to change notification settings - Fork 191
Description
Hello,
I have tried to apply following patch:
[{"op":"test","path":"/missingAttr"}]
on json:
{"intAttr":10,"strAttr":"string"}
And it resulted in panic:
runtime error: invalid memory address or nil pointer dereference:
With stack:
/usr/local/go/src/runtime/panic.go:679
runtime.panicmem
/usr/local/go/src/runtime/panic.go:199
runtime.sigpanic
/usr/local/go/src/runtime/signal_unix.go:394
github.com/evanphx/json-patch.newLazyNode
.../go/pkg/mod/github.com/evanphx/json-patch@v4.9.0+incompatible/patch.go:61
github.com/evanphx/json-patch.Patch.ApplyIndent
.../go/pkg/mod/github.com/evanphx/json-patch@v4.9.0+incompatible/patch.go:752
github.com/evanphx/json-patch.Patch.Apply
.../go/pkg/mod/github.com/evanphx/json-patch@v4.9.0+incompatible/patch.go:718
cm-backend/server/api.processJsonPatch
....
Expectation was to see an error.