aboutsummaryrefslogtreecommitdiff
path: root/lib/tree.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tree.js')
-rw-r--r--lib/tree.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tree.js b/lib/tree.js
index 07a6242b..204d10f4 100644
--- a/lib/tree.js
+++ b/lib/tree.js
@@ -15,6 +15,10 @@ var tree = {
},
createTree: function (depth, width, obj) {
+ depth = depth || 0;
+ width = width || 0;
+ obj = obj || {};
+
if (!obj) {
throw {
name: "ObjectError",