Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax error in IE11 when including via CDN #63

Closed
jbeyer05 opened this issue Mar 5, 2019 · 3 comments
Closed

syntax error in IE11 when including via CDN #63

jbeyer05 opened this issue Mar 5, 2019 · 3 comments

Comments

@jbeyer05
Copy link

jbeyer05 commented Mar 5, 2019

When including via CDN (https://cdn.jsdelivr.net/npm/vue2-filters/dist/vue2-filters.min.js or https://cdn.jsdelivr.net/npm/vue2-filters/dist/vue2-filters.js), IE11 is showing a syntax error at line 215, which is as follows:

eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Converts a string into Capitalize\n * \n * 'abc' => 'Abc'\n * \n * @param {Object} options\n */\n\nfunction capitalize (value, options) {\n options = options || {}\n var onlyFirstLetter = options.onlyFirstLetter != null ? options.onlyFirstLetter : false\n if (!value && value !== 0) return ''\n if(onlyFirstLetter === true) {\n return value.charAt(0).toUpperCase() + value.slice(1)\n } else {\n value = value.toString().toLowerCase().split(' ')\n return value.map( item => {\n return item.charAt(0).toUpperCase() + item.slice(1)\n }).join(' ')\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (capitalize);\n\n\n//# sourceURL=webpack:///./src/string/capitalize.js?");

Thoughts on what the issue might be?

Thanks in advance!

@jbeyer05
Copy link
Author

jbeyer05 commented Mar 5, 2019

It appears that 0.5 broke something. If I switch to 0.4.1 (https://cdn.jsdelivr.net/npm/vue2-filters@0.4.1/dist/vue2-filters.js), things work again in IE11.

@freearhey
Copy link
Owner

Thank you for catching this error. I will try to fix it ASAP.

@jbeyer05
Copy link
Author

jbeyer05 commented Mar 6, 2019

Thanks @freearhey !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants