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'
|
'foo'
|
||||||
@*/
|
@*/
|
||||||
Ox.polyfill.trim = function() {
|
Ox.polyfill.trim = function() {
|
||||||
|
if (this === void 0 || this === null) {
|
||||||
|
throw new TypeError();
|
||||||
|
}
|
||||||
return this.replace(/^\s+|\s+$/g, '');
|
return this.replace(/^\s+|\s+$/g, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue