Improving polyfill inclusion and fixing SVG issues

This commit is contained in:
Bruno Alves de Faria committed 2017-10-31 11:22:37 -02:00
1 parent 88863c5ece
commit f5af70a218
6 files changed
+51 -102

No files matched your search

+10 -4
View File
@@ -1,6 +1,12 @@
import { Meteor } from 'meteor/meteor';
import writeScript from './lib/writeScript';
// Check if browser is IE and add the polyfill scripts
if (navigator && /MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
writeScript('typedarray.min.js');
}
Meteor.startup(() => {
// Check if browser is IE and add the polyfill scripts
if (navigator && /MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
writeScript('typedarray.min.js');
// Fix SVG+USE issues by calling the SVG polyfill
writeScript('svg4everybody.min.js', () => window.svg4everybody());
}
});