angular-ui/bootstrap — pull request #2361 by oliversalzburg (2014-06-18 14:28:18+00:00)
Title: Avoid TypeError when accessing matches

Accessing length on matches may cause a TypeError if matches isn't an array.

Maybe I'm using the directive wrong, but occasionally, I'll run into this issue and get `TypeError: Cannot read property 'length' of undefined`.