diff options
author | isaacs <i@izs.me> | 2013-03-07 03:14:08 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-03-09 20:38:23 +0400 |
commit | 44c19d407ff83a965753a0a50714efe63ff7d5f7 (patch) | |
tree | 2f56f728b773a9258d8d1f36799a9f111915e39f | |
parent | 57ccebf7daab6c832177b2bdfb7b0dfcaef52839 (diff) |
test: better cleaner function
-rw-r--r-- | test/packages/npm-test-peer-deps/test.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/packages/npm-test-peer-deps/test.js b/test/packages/npm-test-peer-deps/test.js index 1e6baa60c..2cf9b9701 100644 --- a/test/packages/npm-test-peer-deps/test.js +++ b/test/packages/npm-test-peer-deps/test.js @@ -30,8 +30,7 @@ function clean (obj) { for (var i in obj) { if (i === "from" || i === "resolved") delete obj[i] - else if (i === "dependencies") - for (var j in obj[i]) - clean(obj[i][j]) + else if (typeof obj[i] === "object" && obj[i]) + clean(obj[i]) } } |