We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e8659d commit b024dfeCopy full SHA for b024dfe
source-map-support.js
@@ -80,13 +80,16 @@ retrieveFileHandlers.push(function(path) {
80
81
var contents = null;
82
if (!fs) {
83
- // Use SJAX if we are in the browser
84
- var xhr = new XMLHttpRequest();
85
- xhr.open('GET', path, false);
86
- xhr.send(null);
87
- var contents = null
88
- if (xhr.readyState === 4 && xhr.status === 200) {
89
- contents = xhr.responseText
+ try {
+ // Use SJAX if we are in the browser
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', path, /** async */ false);
+ xhr.send(null);
+ if (xhr.readyState === 4 && xhr.status === 200) {
+ contents = xhr.responseText;
90
+ }
91
+ } catch (er) {
92
+ contents = '';
93
}
94
} else if (fs.existsSync(path)) {
95
// Otherwise, use the filesystem
0 commit comments