Skip to content

Commit d795fdc

Browse files
committed
check for existence of sponsor object
1 parent 2c9debc commit d795fdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/thread/opened.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function checkIfSponsor(context, after) {
3737
sponsorshipsAsMaintainer: { nodes, pageInfo },
3838
} = result[ownerType]
3939

40-
if (nodes.find((node) => node.sponsor.id === thread.user.node_id)) {
40+
if (nodes.find((node) => node.sponsor && node.sponsor.id === thread.user.node_id)) {
4141
return true
4242
}
4343

0 commit comments

Comments
 (0)