From 1bf7b251901aaefe207e6ed1a3ca8afc93b656a6 Mon Sep 17 00:00:00 2001 From: Dawaxy <37327614+Missmisery@users.noreply.github.com> Date: Tue, 12 Jan 2021 23:51:05 +0800 Subject: [PATCH] docs: typo (#714) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I think it's wrong here :router.push('/admin').push(failure); router.push return promise instance, push should be replaced with then. --- docs/guide/advanced/navigation-failures.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 // '/' -- 2.39.5