diff --git a/demo/index.html b/demo/index.html index 41b94e423..fdf87bb93 100644 --- a/demo/index.html +++ b/demo/index.html @@ -10,6 +10,7 @@
  1. Logger
  2. Signal
  3. +
  4. Router
diff --git a/demo/logger/index.html b/demo/logger/index.html index a9455153f..941012f52 100644 --- a/demo/logger/index.html +++ b/demo/logger/index.html @@ -3,11 +3,11 @@ - + @alwatr/logger +

Check the console

- diff --git a/demo/router/index.html b/demo/router/index.html new file mode 100644 index 000000000..af6e85dac --- /dev/null +++ b/demo/router/index.html @@ -0,0 +1,22 @@ + + + + + + @alwatr/router + + + + +

Check the console

+
    + + + + + +
+ + + + diff --git a/demo/router/index.ts b/demo/router/index.ts new file mode 100644 index 000000000..7c990d2ca --- /dev/null +++ b/demo/router/index.ts @@ -0,0 +1,3 @@ +import {initialRouter} from '@alwatr/router'; + +initialRouter(); diff --git a/demo/signal/index.html b/demo/signal/index.html index 743cf9f9f..9394dd0b3 100644 --- a/demo/signal/index.html +++ b/demo/signal/index.html @@ -3,14 +3,13 @@ - + @alwatr/signal +

Check the console

- - diff --git a/package/router/src/core.ts b/package/router/src/core.ts index 5de170fcd..4bd934e7d 100644 --- a/package/router/src/core.ts +++ b/package/router/src/core.ts @@ -33,8 +33,8 @@ export function updateBrowserHistory(options: RequestRouteParam): void { options.hash ??= ''; if ( - window.location.pathname === options.pathname || - window.location.search === options.search || + window.location.pathname === options.pathname && + window.location.search === options.search && window.location.hash === options.hash ) { return;