mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: optimise check
This commit is contained in:
@@ -318,8 +318,8 @@ Discourse.Post = Discourse.Model.extend({
|
||||
if (typeof value !== "function" && oldValue !== value) {
|
||||
|
||||
// wishing for an identity map
|
||||
if(key === "reply_to_user") {
|
||||
skip = Em.get(value, "username") === Em.get(oldValue, "username");
|
||||
if(key === "reply_to_user" && value && oldValue) {
|
||||
skip = value.username === oldValue.username || Em.get(value, "username") === Em.get(oldValue, "username");
|
||||
}
|
||||
|
||||
if(!skip) {
|
||||
|
||||
Reference in New Issue
Block a user