mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -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;
|
var post = this;
|
||||||
Object.keys(otherPost).forEach(function (key) {
|
Object.keys(otherPost).forEach(function (key) {
|
||||||
var value = otherPost[key];
|
var value = otherPost[key];
|
||||||
var oldValue = post.get(key);
|
// optimisation
|
||||||
|
var oldValue = post[key];
|
||||||
|
|
||||||
if(!value) {
|
if(!value) {
|
||||||
value = null;
|
value = null;
|
||||||
|
|
Loading…
Reference in a new issue