TransferStateService.useScullyTransferState() seems to cause fetchTransferState() to throw an error when navigating from a route without params to a route with params.. but only when refreshing the page on a route without params.. and not when refreshing the page on a route with params.
The result of the useScullyTransferState observable seems to behave differently depending on the route which Angular is freshly loaded from.
🔬 Minimal Reproduction
Step by step in the README. The error reveals itself when navigating in specific steps.
ERROR TypeError: Cannot read property 'transferStateTest' of null
at MapSubscriber.mapper [as project] (pluck.js:13)
at MapSubscriber._next (map.js:29)
at MapSubscriber.next (Subscriber.js:49)
at FilterSubscriber._next (filter.js:33)
at FilterSubscriber.next (Subscriber.js:49)
at BehaviorSubject.next (Subject.js:39)
at BehaviorSubject.next (BehaviorSubject.js:30)
at TapSubscriber._tapNext (scullyio-ng-lib.js:398)
at TapSubscriber._next (tap.js:40)
at TapSubscriber.next (Subscriber.js:49)
🐞 Bug report
Description
TransferStateService.useScullyTransferState()
seems to causefetchTransferState()
to throw an error when navigating from a route without params to a route with params..but only when refreshing the page on a route without params..
and not when refreshing the page on a route with params.
The result of the
useScullyTransferState
observable seems to behave differently depending on the route which Angular is freshly loaded from.🔬 Minimal Reproduction
Step by step in the README. The error reveals itself when navigating in specific steps.
Repo: https://github.com/donmckenna/scully-transferState Live Example: https://wizardly-johnson-148805.netlify.app/
/
and/search
/search
to take a param insearch-routing.module.ts
routes
inscully.--.config.ts
to include this param and assign it atype
of'ignored'
available$
Scully posts throughTransferService.useScullyTransferState()
named'transferStateTest'
/
and, separately, on routes with params, and navigate around withrouterLink
to see their different behaviours.💻Your Environment
Angular Version:
Scully Version:
🔥 Exception or Error