mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
util: Kill off rtrim() helper.
I am 99% sure we can rely on trimRight() and trim() being available in all browsers that we support. I verified in FF. This removes the util dependency from both modules touched here.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
const util = require("./util");
|
||||
let message_type = false; // 'stream', 'private', or false-y
|
||||
|
||||
exports.set_message_type = function (msg_type) {
|
||||
@@ -32,7 +31,7 @@ function get_or_set(fieldname, keep_leading_whitespace) {
|
||||
if (newval !== undefined) {
|
||||
elem.val(newval);
|
||||
}
|
||||
return keep_leading_whitespace ? util.rtrim(oldval) : $.trim(oldval);
|
||||
return keep_leading_whitespace ? oldval.trimRight() : oldval.trim();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user