summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp b/Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp
index ff828cb6b8..a7ae1d54d4 100644
--- a/Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp
+++ b/Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp
@@ -160,8 +160,9 @@ ValueAndAttributes GenericIndexedPropertyStorage::take_last()
m_array_size--;
auto result = m_sparse_elements.get(m_array_size);
+ if (!result.has_value())
+ return {};
m_sparse_elements.remove(m_array_size);
- VERIFY(result.has_value());
return result.value();
}