Browse Source

Fix favicon when there are multiple versions

Jasper van Merle 6 years ago
parent
commit
8d57c48b18
1 changed files with 1 additions and 1 deletions
  1. 1 1
      assets/javascripts/lib/favicon.coffee

+ 1 - 1
assets/javascripts/lib/favicon.coffee

@@ -28,7 +28,7 @@ withImage = (url, action) ->
     currentSlug = doc.slug
     return
 
-  styles = window.getComputedStyle($("._icon-#{doc.slug}"), ':before')
+  styles = window.getComputedStyle($("._icon-#{doc.slug.split('~')[0]}"), ':before')
 
   bgUrl = styles['background-image'].slice(5, -2)
   sourceSize = if bgUrl.includes('@2x') then 32 else 16