Skip to content

Commit 2a764be

Browse files
iamkunoleksiikhr
authored andcommitted
Notification: Fix modifying incoming option object (ElemeFE#16704)
1 parent c27ad04 commit 2a764be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/notification/src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Vue from 'vue';
22
import Main from './main.vue';
3+
import merge from 'element-ui/src/utils/merge';
34
import { PopupManager } from 'element-ui/src/utils/popup';
45
import { isVNode } from 'element-ui/src/utils/vdom';
56
const NotificationConstructor = Vue.extend(Main);
@@ -10,7 +11,7 @@ let seed = 1;
1011

1112
const Notification = function(options) {
1213
if (Vue.prototype.$isServer) return;
13-
options = options || {};
14+
options = merge({}, options);
1415
const userOnClose = options.onClose;
1516
const id = 'notification_' + seed++;
1617
const position = options.position || 'top-right';

0 commit comments

Comments
 (0)