bug ; StringMode.isEmpty returns true for any string

when this.value = "some string with spaces"

this.value.match(/ +/)

will match it making it isEmpty return true

this is a fix for that