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
2828 currentSlug = doc.slug
2929 return
3030
31− styles = window.getComputedStyle($("._icon-#{doc.slug}"), ':before')
31+ styles = window.getComputedStyle($("._icon-#{doc.slug.split('~')[0]}"), ':before')
3232
3333 bgUrl = styles['background-image'].slice(5, -2)
3434 sourceSize = if bgUrl.includes('@2x') then 32 else 16