Update filters.js

"items" isn't always an array when the method is called which leads to unnecessary error messages.This is a potential fix.