asafdav / ng-csv

Simple directive that turns arrays and objects into downloadable CSV files
MIT License
573 stars 215 forks source link

Add support for undefined variable in ng-csv directive #72

Closed jtheoof closed 9 years ago

jtheoof commented 9 years ago

Currently ng-csv="undefinedVariable" will throw an exception because of a bad function call to an undefined variable. This patch simply adds a sanity check and returns an empty csv.

asafdav commented 9 years ago

Great, thank you!