From 2dc50ced4c1eb944006b05ca5f477b97abb83260 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 2 Jun 2014 11:20:37 +1000 Subject: [PATCH] PERF: avoid get in sensitive path --- app/assets/javascripts/discourse/models/post.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/post.js b/app/assets/javascripts/discourse/models/post.js index 6463b90add4..fa7b5c4392f 100644 --- a/app/assets/javascripts/discourse/models/post.js +++ b/app/assets/javascripts/discourse/models/post.js @@ -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;