@simonbackx/vue-app-navigation 2.17.1 → 2.17.3

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/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -478,6 +478,9 @@ class HistoryManagerStatic {
478
478
  * Return to a given history point in time, if needed
479
479
  */
480
480
  returnToHistoryIndex(counter) {
481
+ if (counter < 0) {
482
+ counter = 0;
483
+ }
481
484
  if (this.debug) {
482
485
  console.log("Did return to history index " + counter + ", coming from " + this.counter);
483
486
  }
@@ -511,7 +514,9 @@ class HistoryManagerStatic {
511
514
  this.go(-adjustHistoryCount);
512
515
  }
513
516
  }
514
- if (this.states[this.counter].url) {
517
+ if (!this.states[this.counter]) {
518
+ console.error("Unexpected missing state", this.counter, this.states);
519
+ } else if (this.states[this.counter].url) {
515
520
  if (this.debug) {
516
521
  console.log("Setting manual url without history api: " + this.states[this.counter].url);
517
522
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@simonbackx/vue-app-navigation",
3
3
  "main": "./dist/index.js",
4
4
  "types": "./dist/index.d.ts",
5
- "version": "2.17.1",
5
+ "version": "2.17.3",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./dist/index.js",