Browse Source

Set text as empty string if it isn't to make return value more consistent

pull/1/merge
Luke Childs 9 years ago
parent
commit
aad1eafbcb
  1. 4
      src/parser.js

4
src/parser.js

@ -20,9 +20,9 @@ export default class Urls {
filter(cb) {
// Check we've got something we can parse
// Make sure we have a string
if(typeof this.text !== 'string') {
return '';
this.text = '';
}
// Check callback is a funciton

Loading…
Cancel
Save