Closed yepzy closed 4 years ago
I found that your package make webpages not working on IE 11.
And I found why, it's because in the function getJsHelper of the file src/SharedData.php, the JS code generated use a default parameter (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters) in a function that is not compatible with IE.
getJsHelper
src/SharedData.php
Here is a correction that I tried and works well on IE.
window["'.$this->getJsHelperName().'"] = function(e) { var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; return [window.sharedDataNamespace].concat("string" == typeof e ? e.split(".") : []).reduce(function(e, t) { return e === n || "object" != typeof e || void 0 === e[t] ? n : e[t] }, window) }
Can I send you a pull request to make your package compatible with IE, or you want to do it yourself ?
Hi @yepzy! It would be cool if you submit the PR!
I've published the release!
I found that your package make webpages not working on IE 11.
And I found why, it's because in the function
getJsHelper
of the filesrc/SharedData.php
, the JS code generated use a default parameter (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters) in a function that is not compatible with IE.Here is a correction that I tried and works well on IE.
Can I send you a pull request to make your package compatible with IE, or you want to do it yourself ?