diff --git a/index.js b/index.js index 349b516..ccfc7f1 100644 --- a/index.js +++ b/index.js @@ -68,7 +68,7 @@ function collectMessages(tree) { tree[key].unique = true; } else { // Nested schema - var subtree = collectMessages(tree[key].tree); + var subtree = collectMessages(tree[key].tree || tree[key]); for (var subkey in subtree) { if (subtree.hasOwnProperty(subkey)) {