note.hide is an array right?  Then I would suggest explicitly checking if it is before you check the length as if someone made note.hide a string instead of an array, this code would still run.

`````
if (note.hide && Array.isArray(note.hide) && note.hide.indexOf(key) !== -1) return;
`````

Should be sufficient I think.  I don't think there's any point in checking the array length too.