add missing typecheck in Ox.polyfill.trim

This commit is contained in:
rolux 2013-12-03 18:14:59 +01:00
parent 4d1fbb8533
commit 05f8ed7a48

View file

@ -371,6 +371,9 @@ Ox.polyfill.trim <f> see https://developer.mozilla.org/en/JavaScript/Reference/G
'foo'
@*/
Ox.polyfill.trim = function() {
if (this === void 0 || this === null) {
throw new TypeError();
}
return this.replace(/^\s+|\s+$/g, '');
};