Skip to content

Commit

Permalink
fix:修复 href可能会报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
kodo committed Aug 26, 2016
1 parent 79c242b commit bee28bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@
## How To use

> * ES6
``` bash
# install vue-tap
npm install v-tap --save;
```

```javascript
import vueTap from './vue-tap';
import vueTap from 'v-tap';
Vue.use(vueTap);
```

Expand Down
2 changes: 1 addition & 1 deletion vue-tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
});
e.preventDefault();
if(!self.modifiers.prevent && self.el.href) {
if(!self.modifiers.prevent && self.el.tagName.toLocaleLowerCase() === 'a' && self.el.href) {
return window.location = self.el.href;
}
return self.touchend(e,self,fn);
Expand Down

0 comments on commit bee28bf

Please sign in to comment.