diff --git a/app/serializers/alchemy/page_tree_serializer.rb b/app/serializers/alchemy/page_tree_serializer.rb index eadaf20500..03fd2c01cc 100644 --- a/app/serializers/alchemy/page_tree_serializer.rb +++ b/app/serializers/alchemy/page_tree_serializer.rb @@ -62,8 +62,8 @@ def page_hash(page, has_children, level, folded) external_urlname: page.definition['redirects_to_external'] ? page.external_urlname : nil, url_path: page.url_path, level: level, - root: level == 1, - root_or_leaf: level == 1 || !has_children, + root: page.depth == 1, + root_or_leaf: page.depth == 1 || !has_children, children: [] }