Skip to content

Commit 11645a0

Browse files
committed
Assert that url is a string
Some libraries pass along something stupid for the url argument in window.onerror causing it to blow up without an `indexOf` method. No idea why, and I don't care.
1 parent 3257f65 commit 11645a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vendor/TraceKit/tracekit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
357357
* @return {Array.<string>} Source contents.
358358
*/
359359
function getSource(url) {
360+
if (!isString(url)) return [];
360361
if (!hasKey(sourceCache, url)) {
361362
// URL needs to be able to fetched within the acceptable domain. Otherwise,
362363
// cross-domain errors will be triggered.

0 commit comments

Comments
 (0)