From b3d73030ee76b9ba7382feec05d3bd4ec9b43fa1 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 17 Apr 2019 12:40:49 +0100 Subject: [PATCH] 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 --- app/assets/javascripts/updateContent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/updateContent.js b/app/assets/javascripts/updateContent.js index 516bd913f..928aed1db 100644 --- a/app/assets/javascripts/updateContent.js +++ b/app/assets/javascripts/updateContent.js @@ -34,7 +34,7 @@ ); setTimeout( - () => poll(...arguments), interval + () => poll.apply(window, arguments), interval ); };