coderello / laravel-shared-data

📦 An easy way to share the data from your backend to the JavaScript.
https://coderello.com/docs/laravel-shared-data/1.0/sharing-data
MIT License
321 stars 22 forks source link

make IE compatible #24

Closed yepzy closed 4 years ago

yepzy commented 4 years ago

cf issue #23

hivokas commented 4 years ago

Do we really need arguments.length > 1?

hivokas commented 4 years ago

I've removed the length check and minified the code.

return 'window["'.$this->getJsHelperName().'"]=function(e){var n=void 0!==arguments[1]?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)}';

Is that okay?

yepzy commented 4 years ago

@hivokas

Yes it ok for me

yepzy commented 4 years ago

Hi @hivokas

any update about this PR ?

hivokas commented 4 years ago

Sorry for the delay. I was very busy.