@wizishop/angular-components 14.4.60 → 14.4.62

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.
@@ -20,7 +20,7 @@ import { TranslateModule } from '@ngx-translate/core';
20
20
  import * as i4 from 'ngx-autosize';
21
21
  import { AutosizeModule } from 'ngx-autosize';
22
22
  import * as i1$3 from '@angular/router';
23
- import { NavigationEnd, RouterModule } from '@angular/router';
23
+ import { NavigationStart, RouterModule } from '@angular/router';
24
24
  import * as i2$1 from 'ngx-scrollbar';
25
25
  import { NgScrollbarModule } from 'ngx-scrollbar';
26
26
  import * as i3$1 from 'ngx-scrollbar/reached-event';
@@ -2574,21 +2574,18 @@ class HistoryService {
2574
2574
  }
2575
2575
  registerHistory() {
2576
2576
  this.router.events.subscribe((event) => {
2577
- if (event instanceof NavigationEnd) {
2578
- if (this.history.length > 0 && this.history[this.history.length - 1] === event.urlAfterRedirects.split('?')[0]) {
2577
+ if (event instanceof NavigationStart) {
2578
+ if (this.history.length > 0 && this.history[this.history.length - 1] === event.url.split('?')[0]) {
2579
2579
  return;
2580
2580
  }
2581
- this.history.push(event.urlAfterRedirects.split('?')[0]);
2582
- console.log('history', this.history);
2581
+ this.history.push(event.url.split('?')[0]);
2583
2582
  }
2584
2583
  });
2585
2584
  }
2586
2585
  back(link) {
2587
- console.log('back', this.history);
2588
2586
  this.history.pop();
2589
2587
  if (this.history.length > 0) {
2590
2588
  const lastlink = this.history[this.history.length - 1];
2591
- console.log('lastlink', lastlink);
2592
2589
  this.router.navigate(lastlink.split('/'));
2593
2590
  }
2594
2591
  else {