<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/json/write.go
diff options
context:
space:
mode:
Diffstat (limited to 'json/write.go')
-rw-r--r--json/write.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/json/write.go b/json/write.go
index c2a220e..3a5a621 100644
--- a/json/write.go
+++ b/json/write.go
@@ -209,7 +209,7 @@ func (writer *JSONWriter) navigateTo(keepLen int, path []walk.PathSegment, state
}
func (writer *JSONWriter) inMapAt(keepLen int, path []walk.PathSegment) bool {
- if keepLen < len(path) {
+ if len(path) != 0 {
return false
}
@@ -222,7 +222,7 @@ func (writer *JSONWriter) inMapAt(keepLen int, path []walk.PathSegment) bool {
}
func (writer *JSONWriter) inArrayAt(keepLen int, path []walk.PathSegment) bool {
- if keepLen < len(path) {
+ if len(path) != 0 {
return false
}