MCPcopy Index your code
hub / github.com/codecombat/codecombat / checkAndLogBrowserCrash

Function checkAndLogBrowserCrash

app/core/initialize.js:400–405  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

398
399// Check if the crash happened, and log it on datadog. Note that the application should be initialized before this.
400var checkAndLogBrowserCrash = function () {
401 if (window.sessionStorage != null ? window.sessionStorage.getItem('oz_crashed') : undefined) {
402 log('Browser crashed', {}, 'error')
403 return (window.sessionStorage != null ? window.sessionStorage.removeItem('oz_crashed') : undefined)
404 }
405}
406
407window.onbeforeunload = function (e) {
408 if (utils.isOzaria) {

Callers 1

initFunction · 0.85

Calls 1

logFunction · 0.70

Tested by

no test coverage detected