add missing typecheck in Ox.polyfill.trim
This commit is contained in:
parent
4d1fbb8533
commit
05f8ed7a48
1 changed files with 3 additions and 0 deletions
|
@ -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, '');
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue