IE8 doesn't support .trim() for strings

query.join(' ').trim() doesn't work in IE8 because IE8 doesn't support .trim() for strings