Merge pull request #9311 from RocketChat/fix-svg-firefox
[FIX] svg render on firefoxpull/8800/merge
commit
dde0c2f4e4
@ -1,5 +1,5 @@ |
||||
<template name="icon"> |
||||
<svg class="rc-icon {{block}} {{block}}--{{icon}} {{classes}}" aria-hidden="true"> |
||||
<use xlink:href="#icon-{{icon}}"></use> |
||||
<use xlink:href="{{baseUrl}}#icon-{{icon}}"></use> |
||||
</svg> |
||||
</template> |
||||
|
||||
@ -0,0 +1,7 @@ |
||||
/* globals isFirefox */ |
||||
|
||||
const firefoxBaseUrlFix = () => `${ window.location.origin }${ FlowRouter.current().path }`; |
||||
|
||||
Template.icon.helpers({ |
||||
baseUrl: isFirefox && isFirefox[1] < 55 ? firefoxBaseUrlFix : undefined |
||||
}); |
||||
Loading…
Reference in new issue