diff --git a/Userland/Libraries/LibJS/Runtime/Error.cpp b/Userland/Libraries/LibJS/Runtime/Error.cpp index 07b3121b93..fb7f6c6bf6 100644 --- a/Userland/Libraries/LibJS/Runtime/Error.cpp +++ b/Userland/Libraries/LibJS/Runtime/Error.cpp @@ -93,6 +93,9 @@ void Error::populate_stack() String Error::stack_string(CompactTraceback compact) const { + if (m_traceback.is_empty()) + return {}; + StringBuilder stack_string_builder; // Note: We roughly follow V8's formatting