mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 09:50:22 +00:00
#178 Clone config argument in modals container to prevent mutating user-supplied arguments
This commit is contained in:
@@ -28,7 +28,7 @@ export default {
|
||||
methods: {
|
||||
add (modal, params, config) {
|
||||
let id = this.uid++
|
||||
config = config || {};
|
||||
config = config ? Object.assign({}, config) : {};
|
||||
if (!config.name) {
|
||||
config.name = '_dynamic-modal-' + id;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
id: id,
|
||||
component: modal,
|
||||
params: params || {},
|
||||
config: config || {}
|
||||
config: config
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
this.$modal.show(config.name)
|
||||
|
||||
Reference in New Issue
Block a user