Browse Source

Clickoutside: fix id of undefined, fixed #720

qingwei.li 8 years ago
parent
commit
659a36dc16
3 changed files with 1 additions and 3 deletions
  1. 1 1
      build/bin/new.js
  2. 0 1
      src/utils/clickoutside.js
  3. 0 1
      test/unit/specs/util.clickoutside.spec.js

+ 1 - 1
build/bin/new.js

@@ -22,8 +22,8 @@ const Files = [
     filename: 'index.js',
     content: `const ${ComponentName} = require('./src/main');
 
+/* istanbul ignore next */
 ${ComponentName}.install = function(Vue) {
-  /* istanbul ignore next */
   Vue.component(${ComponentName}.name, ${ComponentName});
 };
 

+ 0 - 1
src/utils/clickoutside.js

@@ -50,7 +50,6 @@ export default {
     for (let i = 0; i < len; i++) {
       if (nodeList[i][ctx].id === el[ctx].id) {
         nodeList.splice(i, 1);
-        delete el[ctx];
         break;
       }
     }

+ 0 - 1
test/unit/specs/util.clickoutside.spec.js

@@ -143,6 +143,5 @@ describe('Utils:Clickoutside', () => {
     Clickoutside.unbind(el);
     document.body.click();
     expect(count).to.equal(1);
-    expect(el[ctx]).to.not.exist;
   });
 });