Skip to content

Commit 852f309

Browse files
committed
Don't create inspector on missing details
1 parent 5fb7b18 commit 852f309

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

dist/elmahio.js

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/elmahio.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/elmahio.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/elmahio.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/elmahio.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,8 +1334,11 @@
13341334
});
13351335
} else {
13361336
// Add inspector to jsonData
1337-
jsonData.data.push({ "key": "X-ELMAHIO-EXCEPTIONINSPECTOR", "value": JSON.stringify(inspectorObj(error.error, errorLog)) });
1338-
// send message
1337+
if (jsonData.detail) {
1338+
jsonData.data.push({ "key": "X-ELMAHIO-EXCEPTIONINSPECTOR", "value": JSON.stringify(inspectorObj(error.error, errorLog)) });
1339+
}
1340+
1341+
// send message
13391342
xhr.send(JSON.stringify(jsonData));
13401343
}
13411344
}

0 commit comments

Comments
 (0)