We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 384af49 commit cfd50e3Copy full SHA for cfd50e3
ValueSystem/ReferenceValue.cs
@@ -8,7 +8,11 @@ public class ReferenceValue(object? value) : Value
8
public bool IsValid => value is not null;
9
public object Value => value ?? throw new ScriptRuntimeError("Value of reference is invalid.");
10
11
- public override bool EqualCondition(Value other) => other is ReferenceValue otherP && Value.Equals(otherP.Value);
+ public override bool EqualCondition(Value other)
12
+ {
13
+ if (other is not ReferenceValue otherP || !IsValid || !otherP.IsValid) return false;
14
+ return Value.Equals(otherP.Value);
15
+ }
16
17
public override string ToString()
18
{
0 commit comments