diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/js/compatibility.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/js/compatibility.js b/core/js/compatibility.js index 3e9178f3200..0cfeefab871 100644 --- a/core/js/compatibility.js +++ b/core/js/compatibility.js @@ -23,3 +23,10 @@ if (!Function.prototype.bind) { return fBound; }; } + +//https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim +if(!String.prototype.trim) { + String.prototype.trim = function () { + return this.replace(/^\s+|\s+$/g,''); + }; +}
\ No newline at end of file |