title: How to fix 'Unhandled promise rejection TypeError: Object doesn't support property or method 'forEach'' error in IE11
body: <p>I'm trying to resolve an issue in IE 11, but I don’t know what to do. I am programming in new code style ES6 so I have to transpiling code from ES6 to ES5 (I use babel for transpile and rollup for bundling...gulp as task manager). </p>
  
  <p>IE 11 reports this error:</p>
  
  <pre><code>Unhandled promise rejection TypeError: Object doesn't support property or method 'forEach'
  </code></pre>
  
  <p>For understanding... Is an autosuggest search component. You can write something on input and my js component will send a request to a server (Promise) and server return json object with data.. then I process them and render a suggestion on the website.</p>
  
  <p>I don’t know where is a problem. I thought that it was the problem with forEach method but I use polyfills so probably not (but maybe it is a problem with setup of my babel or rollup...I really don't know :/)</p>
  
  <p>It is the most likely problem:</p>
  
  <pre><code>...
  requestResult: function(_selector, _inputValue) {
          let self = this;
          let elRequestURL = _selector.dataset.service;
  
          let promiseObj = new Promise(function(resolve, reject) {
              let requestURL = _inputValue === '' ? elRequestURL : elRequestURL + '?query=' + _inputValue;
              let request = new XMLHttpRequest();
              let response = [];
  
              request.open('GET', requestURL);
              request.responseType = 'json';
              request.send();
              request.onreadystatechange = function() {
                  _selector.classList.add('is-loading');
  
                  if (request.readyState === 4){
                      if (request.status === 200){
  
                          var response = request.response;
  
                          _selector.classList.remove('is-loading');
  
                          resolve(response);
                      } else {
                          reject(request.status);
                          console.log("xhr failed");
                      }
                  }
              }
          });
  
  
          return promiseObj;
      },
  ...
  </code></pre>
  
  <p>(If it is necessary, I can send the whole code)</p>
  
  <p>Can it be the problem with Promise? Do you have any experience with this error or any tips how can I resolve it? Internet Explorer doesn’t show on which line is the problem.</p>