diff --git a/utils/testrunner/SourceMapSupport.js b/utils/testrunner/SourceMapSupport.js index ae8933c55e..2cabccc005 100644 --- a/utils/testrunner/SourceMapSupport.js +++ b/utils/testrunner/SourceMapSupport.js @@ -27,6 +27,8 @@ class SourceMapSupport { } async rewriteStackTraceWithSourceMaps(error) { + if (!error.stack || typeof error.stack !== 'string') + return; const stackFrames = error.stack.split('\n'); for (let i = 0; i < stackFrames.length; ++i) { const stackFrame = stackFrames[i];