summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWebView/AccessibilityTreeModel.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWebView/AccessibilityTreeModel.h')
-rw-r--r--Userland/Libraries/LibWebView/AccessibilityTreeModel.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWebView/AccessibilityTreeModel.h b/Userland/Libraries/LibWebView/AccessibilityTreeModel.h
index 7cac5c85b1..fa883af447 100644
--- a/Userland/Libraries/LibWebView/AccessibilityTreeModel.h
+++ b/Userland/Libraries/LibWebView/AccessibilityTreeModel.h
@@ -44,11 +44,9 @@ private:
return *parent_node;
}
- ALWAYS_INLINE static JsonArray const* get_children(JsonObject const& o)
+ ALWAYS_INLINE static Optional<JsonArray const&> const get_children(JsonObject const& o)
{
- if (auto const* maybe_children = o.get_ptr("children"sv); maybe_children)
- return &maybe_children->as_array();
- return nullptr;
+ return o.get_array("children"sv);
}
void map_accessibility_nodes_to_parent(JsonObject const* parent, JsonObject const* child);