From: Dawaxy <37327614+Missmisery@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:51:05 +0000 (+0800) Subject: docs: typo (#714) X-Git-Tag: v4.0.4~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bf7b251901aaefe207e6ed1a3ca8afc93b656a6;p=thirdparty%2Fvuejs%2Frouter.git docs: typo (#714) I think it's wrong here :router.push('/admin').push(failure); router.push return promise instance, push should be replaced with then. --- diff --git a/docs/guide/advanced/navigation-failures.md b/docs/guide/advanced/navigation-failures.md index e2ae0fc8..e9247c33 100644 --- a/docs/guide/advanced/navigation-failures.md +++ b/docs/guide/advanced/navigation-failures.md @@ -71,7 +71,7 @@ All navigation failures expose `to` and `from` properties to reflect the current ```js // trying to access the admin page -router.push('/admin').push(failure => { +router.push('/admin').then(failure => { if (isNavigationFailure(failure, NavigationFailureType.redirected)) { failure.to.path // '/admin' failure.from.path // '/'