From: Eduardo San Martin Morote Date: Tue, 19 May 2020 12:15:32 +0000 (+0200) Subject: refactor: explicit values in error enum X-Git-Tag: v4.0.0-alpha.12~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccb120e0d32d882016d2e383d1186af382c4a700;p=thirdparty%2Fvuejs%2Frouter.git refactor: explicit values in error enum --- diff --git a/src/errors.ts b/src/errors.ts index 885165b0..a66f0640 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -5,12 +5,15 @@ import { RouteLocationNormalized, } from './types' +/** + * order is important to make it backwards compatible with v3 + */ export const enum ErrorTypes { - MATCHER_NOT_FOUND, - NAVIGATION_GUARD_REDIRECT, - NAVIGATION_ABORTED, - NAVIGATION_CANCELLED, - NAVIGATION_DUPLICATED, + MATCHER_NOT_FOUND = 0, + NAVIGATION_GUARD_REDIRECT = 1, + NAVIGATION_ABORTED = 2, + NAVIGATION_CANCELLED = 3, + NAVIGATION_DUPLICATED = 4, } interface RouterErrorBase extends Error {