Conditions | 2 |
Total Lines | 9 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | import {Observer} from '@enbock/state-value-observer/ValueObserver'; |
||
28 | |||
29 | changePage(newPage: PageData): void { |
||
30 | 2 | const currentPage: PageData | null = this.currentPage.value; |
|
31 | 4 | if (currentPage != null && currentPage.name == newPage.name) { |
|
32 | 1 | return; |
|
33 | } |
||
34 | |||
35 | 1 | this.history.replaceState(newPage, newPage.name, newPage.currentUrl); |
|
36 | 1 | this.updatePage(newPage); |
|
37 | } |
||
48 |