Micromodal
Micromodal copied to clipboard
Remove unnecessary spread, use {} as `triggerMap`
Hello. There is a problem in IE11 which needs additional polyfilling in order to work. But I also discovered that it causes errors in IE11 even with polyfills and Babel transpilation.
I found out that polyfilling Array.from is actually unnecessary: the code containing it is generated by Babel transpilation, and caused by spread operators used in the code. But what I found is that spread operators can be either easily removed (in case of converting NodeList to Array), or aren't needed at all.
I also changed triggerMap to be an object instead of array.
BTW, by removing the spread operator we can make Micromodal more "micro" by not relying on additional spread polyfill.