mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
PERF: avoid get in sensitive path
This commit is contained in:
parent
f8c095873c
commit
2dc50ced4c
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue