Skip to content

Commit 548cfd5

Browse files
committed
just return old value instead of set exception
1 parent 2aa81fd commit 548cfd5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

jsonpointer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var get = function(obj, pointer) {
4747
var set = function(obj, pointer, value) {
4848
validate_input(obj, pointer);
4949
if (pointer === "/") {
50-
throw("Cannot modify the value of a parameter.");
50+
return obj;
5151
} else {
5252
pointer = pointer.split("/").slice(1);
5353
return traverse(obj, pointer, value);

0 commit comments

Comments
 (0)