Do you need to check that hide isn't undefined here too?

`````
if (hide && Array.isArray(hide) && hide.indexOf(key) !== -1) continue;
````