History

Fix favicon when there are multiple versions

Jasper van Merle committed 7 years ago

Commit 8d57c481 parent 5dbb8531 file · +1 −1Browse files

Unified · Split

assets/javascripts/lib/favicon.coffee+1−1
@@ -28,7 +28,7 @@ withImage = (url, action) -> · 27 unmodified lines
28 currentSlug = doc.slug28 currentSlug = doc.slug
29 return29 return
30 30
31 styles = window.getComputedStyle($("._icon-#{doc.slug}"), ':before')31 styles = window.getComputedStyle($("._icon-#{doc.slug.split('~')[0]}"), ':before')
32 32
33 bgUrl = styles['background-image'].slice(5, -2)33 bgUrl = styles['background-image'].slice(5, -2)
34 sourceSize = if bgUrl.includes('@2x') then 32 else 1634 sourceSize = if bgUrl.includes('@2x') then 32 else 16