Commit 7dc46481 authored by SkyAo's avatar SkyAo Committed by GitHub

Merge pull request #724 from QingWei-Li/fix/clickoutside-bug

Clickoutside: fix id of undefined, fixed #720
parents 74e6dac4 659a36dc
...@@ -22,8 +22,8 @@ const Files = [ ...@@ -22,8 +22,8 @@ const Files = [
filename: 'index.js', filename: 'index.js',
content: `const ${ComponentName} = require('./src/main'); content: `const ${ComponentName} = require('./src/main');
/* istanbul ignore next */
${ComponentName}.install = function(Vue) { ${ComponentName}.install = function(Vue) {
/* istanbul ignore next */
Vue.component(${ComponentName}.name, ${ComponentName}); Vue.component(${ComponentName}.name, ${ComponentName});
}; };
......
...@@ -50,7 +50,6 @@ export default { ...@@ -50,7 +50,6 @@ export default {
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
if (nodeList[i][ctx].id === el[ctx].id) { if (nodeList[i][ctx].id === el[ctx].id) {
nodeList.splice(i, 1); nodeList.splice(i, 1);
delete el[ctx];
break; break;
} }
} }
......
...@@ -143,6 +143,5 @@ describe('Utils:Clickoutside', () => { ...@@ -143,6 +143,5 @@ describe('Utils:Clickoutside', () => {
Clickoutside.unbind(el); Clickoutside.unbind(el);
document.body.click(); document.body.click();
expect(count).to.equal(1); expect(count).to.equal(1);
expect(el[ctx]).to.not.exist;
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment