From 5a4d6101362a946f96e7b598db90687e98995c60 Mon Sep 17 00:00:00 2001 From: Cory Gibbons Date: Sun, 21 Mar 2021 10:28:02 -0400 Subject: [PATCH] Fix spelling of previousDocument --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a51fca9..350ab72 100644 --- a/README.md +++ b/README.md @@ -110,15 +110,15 @@ Operator does not manage `History` or page title, for maximum flexibility to the user. Most people should probably just use this snippet: ```javascript app.on('after', ({ previousDocument, location }) => { - document.title = previousDocumnt.title + document.title = previousDocument.title window.history.pushState({}, '', location) }) ``` If you want to ignore things like query strings or hashes, use `pathname`: ```javascript -app.on('after', ({ previousDocumnt, pathname }) => { - document.title = previousDocumnt.title +app.on('after', ({ previousDocument, pathname }) => { + document.title = previousDocument.title window.history.pushState({}, '', pathname) }) ```