Permalink
Browse files

Simplify get

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

0 comments on commit cc2ea98

Please sign in to comment.