@fruit-ui/router 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,7 +37,7 @@ const myRouter = router.Router(
37
37
 
38
38
  ## The `navigate` function
39
39
 
40
- The `navigate` function takes in a path and navigates to that path. Navigation is done with `history.pushState` so it is compatible with the browser forward/back methods. You can navigate to hashed paths (i.e., `navigate('/about#contact')`) to automatically scroll to a certain element ID, depending on scroll settings. Navigate does nothing (and no `pagechange` event is dispatched) if the given and existing paths are the same.
40
+ The `navigate` function takes in a path and navigates to that path. Navigation is done with `history.pushState` so it is compatible with the browser forward/back methods. You can navigate to hashed paths (i.e., `navigate('/about#contact')`) to automatically scroll to a certain element ID, depending on scroll settings.
41
41
 
42
42
  `navigate` also takes an optional object `searchParams` representing any other search params to be used.
43
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fruit-ui/router",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "A basic router component for FRUIT",
5
5
  "main": "src/router.js",
6
6
  "homepage": "https://asantagata.github.io/fruit-ui/?page=router-index",
package/src/router.js CHANGED
@@ -136,7 +136,6 @@ function navigate(page, searchParams = {}) {
136
136
  hash = page.slice(page.indexOf('#'));
137
137
  page = page.slice(0, page.indexOf('#'));
138
138
  }
139
- if (page === getPage()) return;
140
139
  const url = new URL(window.location.href);
141
140
  url.search = '';
142
141
  url.searchParams.set(PARAM_NAME, page);