mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-16 17:05:09 -04:00
PERF: optimise check
This commit is contained in:
parent
a487b49a2d
commit
0be6bcacee
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue