Skip to content

Commit

Permalink
Debugging build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreybutler committed Jul 30, 2016
1 parent 5755cea commit 034e9e5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,14 @@ Object.defineProperty(window.chassis, 'core', {
console.log(e)
event = document.createEvent('Event')
if (payload) {
event.initCustomEvent(eventName, true, true, {
detail: payload
})
try {
event.initCustomEvent(eventName, true, true, {
detail: payload
})
} catch (e2) {
event.initEvent(eventName, true, true)
event.detail = payload
}
} else {
event.initEvent(eventName, true, true)
}
Expand Down

0 comments on commit 034e9e5

Please sign in to comment.