iFixit / charge

A tool to upload static images for the site
3 stars 2 forks source link

Default HOSTS_TO_CACHE_BUST to empty string instead of nil #21

Closed copperwall closed 4 years ago

copperwall commented 4 years ago

Hey friendos, I was trying to set this up and was running into an issue when the HOSTS_TO_CACHE_BUST variable was unset. I thought I'd make a PR.

This defaults the HOSTS_TO_CACHE_BUST env variable variable to empty string instead of nil, because calling .split on nil results in an error.

This also removes the nil check in services/cache_buster.rb because charge.rb sets the config to always be an array.

djmetzle commented 4 years ago

Nice! Thanks @copperwall

CR :gear: