Skip to content
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

fix: added nullsafe operator to patch home error #85

Merged

Conversation

KarlHeitmann
Copy link
Contributor

I am experiencing an issue visiting the page jsonvisio.com using firefox developer edition 104.0b6. It appears the initialization to display the sponsors.users array on useConfig.tsx introduced on commit ae667d4a3b6db200055bfd5401c704aef39784f5 with message log add sponsors section is failing for this firefox edition. This is the screenshot.

image

Error log on console:

TypeError: can't access property "length", e.users is undefined
    NextJS 10
_app-386553644f916d14.js:1:29310

TypeError: can't access property "length", e.users is undefined
    NextJS 10
_app-386553644f916d14.js:1:29310

image

I copied only the relevant error messages. When reproducing on my local main branch, I found the error was on the line I'm changing on this commit.

After creating this patch, I visited jsonvisio.com using firefox 103.0.1 version, and it works. I think this is an issue while loading the default data for sponsors in the latest firefox edition. After putting some debug lines on my local machine, and revert my changes, the issue was gone. This is patch, because I am adding a nullsafe operator to an object attribute that should be initialized as an empty array. When debugging the issue, I found the value of sponsors was:

sponsors = {}

Expected:

{
  "users": [],
  "nextDate": 1660014720690
}

@AykutSarac AykutSarac merged commit 01ab331 into AykutSarac:main Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants