I think `filter.patterns.join("\n")` works even if length is 0.