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:
parent
a1cc9a6e33
commit
8010c010e9
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user