Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 3c8adc8

Browse files
committed
Merge pull request #11124 from humphd/error-stack-property
Shim Error.prototype.stack for browsers that lack it. Merging
2 parents ac66fd6 + 7955d2f commit 3c8adc8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/utils/Compatibility.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ define(function () {
3939
String.prototype.trimLeft = function () { return this.replace(/^\s+/, ""); };
4040
}
4141

42+
// Feature detection for Error.stack. Not all browsers expose it
43+
// and Brackets assumes it will be a non-null string.
44+
if (typeof (new Error()).stack === "undefined") {
45+
Error.prototype.stack = "";
46+
}
47+
4248
});

0 commit comments

Comments
 (0)