TestArmada / guacamole

A friendly wrapper for the SauceLabs browser and device API
MIT License
11 stars 6 forks source link

data.filter is not a function #42

Closed obchap closed 5 years ago

obchap commented 5 years ago
14:35:18 [ERROR] [Magellan] TypeError: data.filter is not a function
14:35:18 at Object._normalize (//node_modules/guacamole/src/browsers.js:221:8)
14:35:18 at SauceBrowsers._fetch.then (/node_modules/guacamole/src/browsers.js:487:34)

I think the issue might be that when SauceLabs does not return an array in the following call

SauceBrowsers._fetch()
      .then((data) => {
        SauceBrowsers._haveCachedSauceBrowsers = true;
        browsers = SauceBrowsers._normalize(data);

it will then try to call .filter on an object or null object at

_normalize: (data) => {
    const overallResult = data
      .filter((browser) =>