diff --git a/Tomes/TomeArray.cs b/Tomes/TomeArray.cs index 06dea97..3c36356 100644 --- a/Tomes/TomeArray.cs +++ b/Tomes/TomeArray.cs @@ -43,7 +43,7 @@ public TomeArray(JArray data, JToken root) // private void EmitToParents(JToken oldValue) { - if (this != root) + if (!ReferenceEquals(this, root)) { Tome.EmitParentChange(Parent); } diff --git a/Tomes/TomeObject.cs b/Tomes/TomeObject.cs index e2071bf..10f1f65 100644 --- a/Tomes/TomeObject.cs +++ b/Tomes/TomeObject.cs @@ -44,7 +44,7 @@ public TomeObject(JObject data, JToken root) // private void EmitToParents(JToken oldValue) { - if (this != root) + if (!ReferenceEquals(this, root)) { Tome.EmitParentChange(Parent); } diff --git a/Tomes/TomeValue.cs b/Tomes/TomeValue.cs index 89be577..b75c05e 100644 --- a/Tomes/TomeValue.cs +++ b/Tomes/TomeValue.cs @@ -30,7 +30,7 @@ public TomeValue(JValue value, JToken root) : base(value) // private void EmitToParents(JToken oldValue) { - if (!Equals(this, root)) + if (!ReferenceEquals(this, root)) { Tome.EmitParentChange(Parent); }