-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
TypeError in Internet Explorer 11 because Object.assign doesn't exist there #3321
Comments
To save some time, here's the PR that introduced the issue: #3301 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is commenting enough to make it un-stale? Not sure if there's anything else to do? |
I guess it is 😄 About the contents of your post. The package.json shows a polyfill in the devDependencies. My guess is that the polyfill is injected during the test suite but not bundled with the distributed version. |
IE11 is a low priority target, so this would be up-for-grabs to anyone to tackle. |
I have created a fix by checking for IE and including a polyfill. |
- Added the possibility of customizing styles via parameters - Fixed .less for IE 11, see: less/less.js#3321 - Improved resizing for opening modals
While this polyfill may have worked when v3.8.x was new, as of July 2021, version 4.1.1 will still not work with IE11 after applying the polyfill for Object.assign() method. Today's less-4.1.1 file uses other JS functions that don't exist in IE11, like Object.getOwnPropertySymbols() and native Promises. I suggest this issue be closed as it's no longer in scope to today's code or possibly merged into an overarching IE11 non-support issue. I'd also ask that this discussion doesn't devolve into whether or not IE11 is worth anybody's time. The lesscss.org site lists IE11 as a supported browser, and is still within support status from Microsoft for the time being. |
Polyfill hint: Include this <script src="https://polyfill.io/v3/polyfill.min.js?features=es5%2Ces2015"></script> before including |
I'm using less.js version 3.8.1 in the Browser for local development (less.min.js from /dist from the 3.8.1 Release Source Zip), and in Internet Explorer 11 it throws a TypeError because Object.assign doesn't exist there. http://lesscss.org/usage/ says that IE11+ should be supported. Polyfilling Object.assign makes less.js work in Internet Explorer 11 as well.
Earlier Versions (upgraded from less.js 2.7.1) worked fine in IE.
The text was updated successfully, but these errors were encountered: