Browse Source

fix lint and test coverage

Evan You 10 years ago
parent
commit
23db8bb2bf
2 changed files with 3 additions and 7 deletions
  1. 2 5
      src/compiler/compile-props.js
  2. 1 2
      test/unit/specs/misc_spec.js

+ 2 - 5
src/compiler/compile-props.js

@@ -123,11 +123,8 @@ module.exports = function compileProps (el, propOptions) {
  */
 
 function hasBindingAttr (el, attr) {
-  if (attr === 'class') {
-    return false
-  }
-
-  return (
+  /* istanbul ignore next */
+  return attr !== 'class' && (
     el.hasAttribute(':' + attr) ||
     el.hasAttribute('v-bind:' + attr)
   )

+ 1 - 2
test/unit/specs/misc_spec.js

@@ -289,9 +289,8 @@ describe('Misc', function () {
     }
 
     document.body.appendChild(el)
-    
     el.setAttribute(':title', '')
-    if(el.getAttribute('title') === null) {
+    if (el.getAttribute('title') === null) {
       // this browser does not need this test
       done()
       return