export function renderCompatibleIE(render: Function, render2?: Function) { function isIE() { const ua = window.navigator.userAgent; const msie = ua.indexOf('MSIE '); if (msie > 0) { // IE 10 or older => return version number // return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)), 10); return true; } const trident = ua.indexOf('Trident/'); if (trident > 0) { // IE 11 => return version number // return parseInt(ua.substring(trident + 8, ua.indexOf(".", trident)), 10); return true; } return false; } if (isIE()) { return render2 ? render2() : null; } return render(); }