Permalink
Browse files

Simplify set

  • Loading branch information...
1 parent cc2ea98 commit 0a5a962770bf41ff605365d9d27339b2e6c646c9 @peritus peritus committed Aug 4, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 jsonpointer.js
View
@@ -48,10 +48,9 @@ var set = function(obj, pointer, value) {
validate_input(obj, pointer);
if (pointer === "/") {
return obj;
- } else {
- pointer = pointer.split("/").slice(1);
- return traverse(obj, pointer, value);
}
+ pointer = pointer.split("/").slice(1);
+ return traverse(obj, pointer, value);
}
exports.get = get

0 comments on commit 0a5a962

Please sign in to comment.