gitcoinco / code_fund_ads

CodeFund is an open source platform that helps fund maintainers, bloggers, and builders through non-tracking ethical ads
https://codefund.io
GNU Affero General Public License v3.0
375 stars 104 forks source link

Prevent `undefined method 'gravatar_url' for nil:NilClass` error in avatar component #1325

Closed andrewmcodes closed 4 years ago

andrewmcodes commented 4 years ago

Type of PR

Description

Provides some safety measures for nil users in the Avatar component, as well as some light refactoring.

Fixes #1324

Checklist

Screenshots

codecov[bot] commented 4 years ago

Codecov Report

Merging #1325 into master will increase coverage by 0.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1325      +/-   ##
==========================================
+ Coverage   34.76%   34.83%   +0.07%     
==========================================
  Files         345      345              
  Lines        7989     7995       +6     
==========================================
+ Hits         2777     2785       +8     
+ Misses       5212     5210       -2     
Impacted Files Coverage Δ
app/components/application_component.rb 64.70% <100.00%> (+14.70%) :arrow_up:
app/components/avatar_component.rb 100.00% <100.00%> (ø)
app/jobs/schedule_organization_report_job.rb 86.20% <0.00%> (ø)