m-e-conroy / angular-dialog-service

A complete AngularJS service with controllers and templates for generating application modals and dialogs for use with Angular-UI-Bootstrap and Twitter Bootstrap
MIT License
618 stars 228 forks source link

Determine if selectorText is defined before applying toLowerCase method. #154

Closed KevinHoward closed 8 years ago

KevinHoward commented 8 years ago

When searching for the .fa element attribute, you have rightfully used the toLowerCase method, however I am running across situations where selectorText is undefined, so JavaScript is throwing an exception stating that undefined doesn't have a method toLowerCase. So, I have added a check to make sure that selectorText is defined before your original check.

There may be a better solution to make this cleaner.

niemyjski commented 8 years ago

Has this been working for you? Is this ready to be merged?

niemyjski commented 8 years ago

@dougmoscrop if you want to write this in es5 can you submit a new pr

dougmoscrop commented 8 years ago

I'm fine with leaving it as something to do in an 'es5 pass' or whatever.

niemyjski commented 8 years ago

Thanks!