summaryrefslogtreecommitdiff
path: root/Libraries/LibJS
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS')
-rw-r--r--Libraries/LibJS/Runtime/Shape.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Libraries/LibJS/Runtime/Shape.cpp b/Libraries/LibJS/Runtime/Shape.cpp
index ecfb4b1145..bb763e225a 100644
--- a/Libraries/LibJS/Runtime/Shape.cpp
+++ b/Libraries/LibJS/Runtime/Shape.cpp
@@ -104,9 +104,10 @@ void Shape::visit_children(Cell::Visitor& visitor)
for (auto& it : m_forward_transitions)
visitor.visit(it.value);
- ensure_property_table();
- for (auto& it : *m_property_table)
- it.key.visit_children(visitor);
+ if (m_property_table) {
+ for (auto& it : *m_property_table)
+ it.key.visit_children(visitor);
+ }
}
Optional<PropertyMetadata> Shape::lookup(const StringOrSymbol& property_name) const