How to use the vue-router.isNavigationFailure function in vue-router

To help you get started, we’ve selected a few vue-router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github housepower / ckman / frontend / src / common / app / run.ts View on Github external
const errorHandler = event => {
  if (!event.reason) return;

  if (event.reason instanceof Error) {
    if (VueRouter.isNavigationFailure(event.reason)) {
      return;
    }

    $message.fuck(event.reason);
    return;
  }

  if (event.reason.isAxiosError) {
    // $message.fuck(event.reason);
    $notify.fuck(event.reason);
    return;
  }

  if (axios.isCancel(event.reason)) {
    event.preventDefault();
    return;