1
0
Эх сурвалжийг харах

Fix favicon when there are multiple versions

Jasper van Merle 6 жил өмнө
parent
commit
8d57c48b18

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

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