Remove use of spread operator

This is a temporary fix for the fact that the
babel plugin for the spread operator calls a
function called `_iterableToArray` which assumes
the JavaScript runtime supports Symbols.

IE11 doesn't support Symbols so this causes an
error when it runs our JS.

This swaps out use of the spread operator for a
use of
[apply](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
to unpack the `arguments` object.

Related issue on babel:

https://github.com/babel/babel/issues/7597
This commit is contained in:
Tom Byers
2019-04-17 12:40:49 +01:00
parent 66aba1444a
commit b3d73030ee

View File

@@ -34,7 +34,7 @@
);
setTimeout(
() => poll(...arguments), interval
() => poll.apply(window, arguments), interval
);
};