@fruit-ui/router 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/router.js +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fruit-ui/router",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
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
@@ -100,6 +100,7 @@ function Router(routes, scrollOptions = {hashed: {}, unhashed: {to: {x: 0, y: 0}
100
100
  document.title = getRoute(routes, getPage()).title ?? document.title;
101
101
  },
102
102
  mount() {
103
+ document.title = getRoute(routes, getPage()).title ?? document.title;
103
104
  window.onpopstate = () => broadcastPageChange(getPage());
104
105
  const page = getPage();
105
106
  const route = getRoute(routes, page);