[devdocsgjs/main: 703/1867] Fix favicon when there are multiple versions




commit 8d57c48b183eede77091d98990c594e7a7cedb38
Author: Jasper van Merle <jaspervmerle gmail com>
Date:   Sun Aug 4 03:01:04 2019 +0200

    Fix favicon when there are multiple versions

 assets/javascripts/lib/favicon.coffee | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/assets/javascripts/lib/favicon.coffee b/assets/javascripts/lib/favicon.coffee
index 176bd79c..5254b54c 100644
--- a/assets/javascripts/lib/favicon.coffee
+++ b/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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]