Skip to content

Commit

Permalink
fix: add a workaround type check for tipUsers to ensure it's an array (
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs authored Nov 9, 2024
1 parent eeadf96 commit 5fed7c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/renderer/src/store/feed/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ class FeedActions {
if (targetFeed?.owner) {
feed.owner = { ...targetFeed.owner }
}
if (targetFeed && "tipUsers" in targetFeed && targetFeed.tipUsers) {
if (
targetFeed &&
"tipUsers" in targetFeed &&
targetFeed.tipUsers &&
// Workaround for type issue
Array.isArray(targetFeed.tipUsers)
) {
feed.tipUsers = [...targetFeed.tipUsers]
}

Expand Down

0 comments on commit 5fed7c8

Please sign in to comment.