-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make access to botCache and anonymousCache more robust #2411
Conversation
Thanks @saschaszott. I tried to test this by building Angular on DSpace 7.6 and I'm running in dev mode with both the |
We are using the |
I don't use docker for dspace-angular so I can't tell you how you're supposed start the dev server using docker. Perhaps @tdonohue can shed some light on this? |
@saschaszott : There are two
I tried spinning up latest Here's how I started everything up locally in Docker:
In my PM2 logs, I see the (SSR) request to the homepage, but no errors appear. I tried reloading the homepage several times (still no errors appear). I tried accessing the homepage from a different browser (Firefox instead of Chrome) still no errors appear. So, I cannot reproduce the scenario that this PR claims to fix. I'm also unsure about the fix here... as you seem to just be replacing So, I don't understand why this PR is necessary. It almost seems to imply that you have a scenario where one of the |
@saschaszott : As I cannot seem to reproduce this issue & others feel this isn't a good direction, I'm going to close this PR. That said, please do let us know if you find a way for this to be reliably reproduced... we can always reopen this at a later time and re-test if needed. Thanks! |
Both
botCache
andanonymousCache
are only initialized if the Angular app is running in production mode. This means that it is not sufficient to check the return value ofbotCacheEnabled()
/anonymousCacheEnabled()
istrue
.If you're running in development mode you'll get a
TypeError
(access onundefined
object).This PR makes the access to
botCache
andanonymousCache
more robust.