提交 8b1d76d2 编写于 作者: O owen-m1

Error when mounting duplicate plugins

上级 88838bfa
......@@ -12,6 +12,13 @@ export default {
plugin[option] = defaults[option];
}
}
plugins.forEach(p => {
if (p.pluginName === plugin.pluginName) {
throw (`Sortable: Cannot mount plugin ${ plugin.pluginName } more than once`);
}
});
plugins.push(plugin);
},
pluginEvent(eventName, sortable, evt) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册