Skip to content

Commit

Permalink
missed updating dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Pains committed Apr 30, 2020
1 parent 6498a68 commit 383f548
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ export const mouseless = {
const focus = binding && binding.modifiers && binding.modifiers.focus;
// el might not be present for server-side rendering.
if (el) {
MouseTrap.bind(binding.value, (e) => {
MouseTrap.bind(binding.value instanceof Object ? binding.value.key : binding.value, (e) => {
if (focus) {
el.focus();
}
else if (binding.value instanceof Object &&
binding.value.action instanceof Function) {
binding.value.action();
}
else {
el.click();
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-mouseless",
"version": "1.0.2",
"version": "1.0.3",
"description": "A tiny vue directive to bind shortcut keys using mousetrap",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 383f548

Please sign in to comment.