diff --git a/json-tree.js b/json-tree.js index 49a00d2..9fab8d2 100644 --- a/json-tree.js +++ b/json-tree.js @@ -38,12 +38,11 @@ module.exports = function jsonTree(json) { fileName = fileName.slice(2); } - rootSize += mod.size; - getFile(mod, fileName, root); }); root.maxDepth = maxDepth; + root.size = rootSize; return root; }