зеркало из https://github.com/microsoft/Power-Fx.git
Fix NullReferenceException on new IsOptionSetBackedByXXX properties (#2497)
Noticed from telemetry some NullReferenceException errors in those new properties. Adding guard to fix it.
This commit is contained in:
Родитель
404d570ba1
Коммит
0c4d1dc16b
|
@ -599,13 +599,13 @@ namespace Microsoft.PowerFx.Core.Types
|
|||
|
||||
public bool IsOptionSet => Kind == DKind.OptionSet || Kind == DKind.OptionSetValue;
|
||||
|
||||
public bool IsOptionSetBackedByNumber => IsOptionSet && OptionSetInfo.BackingKind == DKind.Number;
|
||||
public bool IsOptionSetBackedByNumber => IsOptionSet && OptionSetInfo?.BackingKind == DKind.Number;
|
||||
|
||||
public bool IsOptionSetBackedByBoolean => IsOptionSet && OptionSetInfo.BackingKind == DKind.Boolean;
|
||||
public bool IsOptionSetBackedByBoolean => IsOptionSet && OptionSetInfo?.BackingKind == DKind.Boolean;
|
||||
|
||||
public bool IsOptionSetBackedByColor => IsOptionSet && OptionSetInfo.BackingKind == DKind.Color;
|
||||
public bool IsOptionSetBackedByColor => IsOptionSet && OptionSetInfo?.BackingKind == DKind.Color;
|
||||
|
||||
public bool IsOptionSetBackedByString => IsOptionSet && OptionSetInfo.BackingKind == DKind.String;
|
||||
public bool IsOptionSetBackedByString => IsOptionSet && OptionSetInfo?.BackingKind == DKind.String;
|
||||
|
||||
public bool IsView => Kind == DKind.View || Kind == DKind.ViewValue;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче