mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-09 07:06:36 +02:00
fix(event-handler): use Object.key for passing values in an event
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user