We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71cb9e5 commit 363df28Copy full SHA for 363df28
javascript/webdriver/stacktrace.js
@@ -562,11 +562,14 @@ webdriver.stacktrace.parseLongFirefoxFrame_ = function(frameStr) {
562
* V8 prepends the string representation of an error to its stack trace.
563
* This function trims the string so that the stack trace can be parsed
564
* consistently with the other JS engines.
565
- * @param {!(Error|goog.testing.JsUnitException)} error The error.
+ * @param {(Error|goog.testing.JsUnitException)} error The error.
566
* @return {string} The stack trace string.
567
* @private
568
*/
569
webdriver.stacktrace.getStack_ = function(error) {
570
+ if (!error) {
571
+ return '';
572
+ }
573
var stack = error.stack || error.stackTrace || '';
574
var errorStr = error + '\n';
575
if (goog.string.startsWith(stack, errorStr)) {
0 commit comments