diff --git a/public/src/utils.js b/public/src/utils.js index 8638d06750..8f2dcb8e87 100644 --- a/public/src/utils.js +++ b/public/src/utils.js @@ -429,5 +429,11 @@ }; } + if (typeof String.prototype.rtrim !== 'function') { + String.prototype.rtrim = function () { + return this.replace(/\s+$/g, ''); + }; + } + return utils; }));