PERF: avoid get in sensitive path
This commit is contained in:
parent
f8c095873c
commit
2dc50ced4c
|
@ -303,7 +303,8 @@ Discourse.Post = Discourse.Model.extend({
|
|||
var post = this;
|
||||
Object.keys(otherPost).forEach(function (key) {
|
||||
var value = otherPost[key];
|
||||
var oldValue = post.get(key);
|
||||
// optimisation
|
||||
var oldValue = post[key];
|
||||
|
||||
if(!value) {
|
||||
value = null;
|
||||
|
|
Loading…
Reference in New Issue