0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-28 20:52:21 +01:00

fix(event-handler): use Object.key for passing values in an event

This commit is contained in:
Johann-S 2018-06-17 15:26:18 +02:00 committed by XhmikosR
parent a1cc9a6e33
commit 8010c010e9

View File

@ -281,7 +281,14 @@ const EventHandler = (() => {
// merge custom informations in our event
if (typeof args !== 'undefined') {
evt = Object.assign(evt, args)
Object.keys(args)
.forEach((key) => {
Object.defineProperty(evt, key, {
get() {
return args[key]
}
})
})
}
if (defaultPrevented) {