Skip to content

Commit

Permalink
Fix error on SendFeedback page (fixes #2951)
Browse files Browse the repository at this point in the history
If some piece of information isn't available on a particular
system (in my case, vram), then `systeminformation` produces a
`null` value when queried. `null` satisfies the `typeof === 'object`'
check, causing us to attempt to iterate over it, even though it's
not iterable.

Excluding `null` from such attempts keeps the SendFeedback page
from crashing.
  • Loading branch information
alts committed Jun 20, 2024
1 parent 4ba41c5 commit dcf0c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/modal-widgets/SendFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ ${log}
);
}

if (typeof input === "object") {
if (typeof input === "object" && input !== null) {
return (
<>
{Object.keys(input).map((k) => (
Expand Down

0 comments on commit dcf0c6f

Please sign in to comment.