Fix bug with null values, refractorize code
Fix bug with null values, refractorize code

If null values arrives the plugin crashes, with this little change not happens
OpenCST/angular-truncate,igreulich/angular-truncate