Skip to content

Commit

Permalink
fix(modal): fix JavaScript error in IE11
Browse files Browse the repository at this point in the history
We hit babel/babel#7597 with our logic turning `NodeList` to an array,
but turned out it's not needed there.

Fixes carbon-design-system#2068.
  • Loading branch information
asudoh committed Mar 22, 2019
1 parent 78ce387 commit ca61c03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/globals/js/mixins/init-component-by-launcher.js
Expand Up @@ -45,9 +45,7 @@ export default function(ToMix) {

if (launcher) {
event.delegateTarget = launcher; // eslint-disable-line no-param-reassign
const elements = [
...launcher.ownerDocument.querySelectorAll(launcher.getAttribute(effectiveOptions.attribInitTarget)),
];
const elements = launcher.ownerDocument.querySelectorAll(launcher.getAttribute(effectiveOptions.attribInitTarget));
if (elements.length > 1) {
throw new Error('Target widget must be unique.');
}
Expand Down

0 comments on commit ca61c03

Please sign in to comment.