Skip to content

null checking on .some functions#1060

Merged
shamsmosowi merged 1 commit intodevelopfrom
fix/undefined-some-function
Jan 9, 2023
Merged

null checking on .some functions#1060
shamsmosowi merged 1 commit intodevelopfrom
fix/undefined-some-function

Conversation

@bofeiw
Copy link
Contributor

@bofeiw bofeiw commented Jan 6, 2023

As seen in #1037, some objects may be undefined before accessing .some function. This PR adds null checking for it in an attempt to resolve the issue.

Error stack for tracing id ROWYERR-F917-CEEA-490C-78540106AD05
TypeError: Cannot read properties of undefined (reading 'some')\n at https://rowy.app/static/js/main.3928d7f4.js:205:2244554\n at Array.filter ()\n at Object.read (https://rowy.app/static/js/main.3928d7f4.js:205:2244485)\n at k (https://rowy.app/static/js/main.3928d7f4.js:205:2631450)\n at Object.I [as r] (https://rowy.app/static/js/main.3928d7f4.js:205:2631763)\n at s (https://rowy.app/static/js/main.3928d7f4.js:205:2635381)\n at https://rowy.app/static/js/main.3928d7f4.js:205:2635585\n at Object.Ca [as useReducer] (https://rowy.app/static/js/main.3928d7f4.js:205:1754814)\n at t.useReducer (https://rowy.app/static/js/main.3928d7f4.js:205:1856923)\n at x (https://rowy.app/static/js/main.3928d7f4.js:205:2635567)

@bofeiw bofeiw requested a review from shamsmosowi January 6, 2023 13:10
@vercel
Copy link

vercel bot commented Jan 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
rowy-os ✅ Ready (Inspect) Visit Preview Jan 6, 2023 at 1:10PM (UTC)
rowy-typedoc ✅ Ready (Inspect) Visit Preview Jan 6, 2023 at 1:10PM (UTC)

@shamsmosowi shamsmosowi merged commit 155caa9 into develop Jan 9, 2023
@bofeiw bofeiw deleted the fix/undefined-some-function branch January 9, 2023 19:31
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