Skip to content

Commit

Permalink
Fix missing TouchEvent on some desktop browsers (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maronato authored May 28, 2020
1 parent 1d1d037 commit e5411c3
Show file tree
Hide file tree
Showing 4 changed files with 1,012 additions and 99 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"@types/vue": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"@vue/cli-plugin-babel": "~4.2.0",
"@vue/cli-plugin-eslint": "~4.2.0",
"@vue/cli-plugin-typescript": "~4.2.0",
"@vue/cli-plugin-unit-jest": "~4.2.0",
"@vue/cli-plugin-babel": "~4.4.1",
"@vue/cli-plugin-eslint": "~4.4.1",
"@vue/cli-plugin-typescript": "~4.4.1",
"@vue/cli-plugin-unit-jest": "~4.4.1",
"@vue/cli-service": "~4.2.0",
"@vue/composition-api": "^0.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/ts/interface.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import _Vue from "vue";
import { VueConstructor } from "vue/types";
import ToastContainer from "../components/VtToastContainer.vue";
Expand Down
2 changes: 1 addition & 1 deletion src/ts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const isJSX = (obj: unknown): obj is JSX.Element =>
hasProp(obj, "tag") && isNonEmptyString(obj.tag);

const isTouchEvent = (event: Event): event is TouchEvent =>
event instanceof TouchEvent;
window.TouchEvent && event instanceof TouchEvent;

const isToastComponent = (obj: unknown): obj is ToastComponent =>
hasProp(obj, "component") && isToastContent(obj.component);
Expand Down
Loading

0 comments on commit e5411c3

Please sign in to comment.