mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
js: Convert _.extend to spread syntax or Object.assign.
This is not always a behavior-preserving translation: _.extend mutates its first argument. However, the code does not always appear to have been written to expect that. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
6f32ef749f
commit
dbffb2a614
@@ -175,7 +175,7 @@ exports.array_compare = function util_array_compare(a, b) {
|
||||
const unassigned_value_sentinel = {};
|
||||
exports.CachedValue = function (opts) {
|
||||
this._value = unassigned_value_sentinel;
|
||||
_.extend(this, opts);
|
||||
Object.assign(this, opts);
|
||||
};
|
||||
|
||||
exports.CachedValue.prototype = {
|
||||
|
||||
Reference in New Issue
Block a user