@@ -17,7 +17,6 @@ import {
1717} from '@ngrx/signals' ;
1818import { setAllEntities , withEntities } from '@ngrx/signals/entities' ;
1919import { rxMethod } from '@ngrx/signals/rxjs-interop' ;
20- import { isEqual , isNil } from 'lodash' ;
2120import { pipe , switchMap , tap } from 'rxjs' ;
2221
2322import {
@@ -97,7 +96,8 @@ export function withWeatherForecastFeature() {
9796
9897 withMethods ( ( { layoutStore, weatherForecasts, ...store } ) => ( {
9998 getForecasts ( request : { count : number ; plus : boolean } ) {
100- const reload = isEqual ( store . request ( ) , request ) ;
99+ const reload =
100+ JSON . stringify ( store . request ( ) ) === JSON . stringify ( request ) ;
101101
102102 layoutStore . setCount ( request . count ) ;
103103 patchState ( store , request ) ;
@@ -142,9 +142,9 @@ export function weatherForecastFilter(
142142 filteredForecasts : computed ( ( ) =>
143143 weatherForecasts ( ) ?. filter (
144144 ( forecast ) =>
145- ( isNil ( store . filter ( ) ?. minTemperatureC ) ||
145+ ( store . filter ( ) ?. minTemperatureC == null ||
146146 forecast . temperatureC >= store . filter ( ) ?. minTemperatureC ) &&
147- ( isNil ( store . filter ( ) ?. maxTemperatureC ) ||
147+ ( store . filter ( ) ?. maxTemperatureC == null ||
148148 forecast . temperatureC <= store . filter ( ) ?. maxTemperatureC ) ,
149149 ) ,
150150 ) ,
0 commit comments