Skip to content

Commit

Permalink
chore(): prevent assign undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed May 25, 2022
1 parent 05cd426 commit 92de91e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/hub/src/datasources/moderation-decision.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class ModerationDecisionAPI extends DataSource {
const reports = await reportingAPI.countReports(contentID);
// add reasons
const reasons = await reportingAPI.getReasons(contentID);
Object.assign(finalDecision, {
Object.assign(finalDecision || {}, {
reports,
reportedBy,
reportedDate,
Expand Down

0 comments on commit 92de91e

Please sign in to comment.