Fix in StateMachines
This commit is contained in:
parent
07dec0dc9d
commit
dfa479d409
@ -36,7 +36,7 @@ namespace TelegramBotBase.States
|
|||||||
|
|
||||||
this.FallbackStateForm = fallbackStateForm;
|
this.FallbackStateForm = fallbackStateForm;
|
||||||
|
|
||||||
if (!this.FallbackStateForm.IsSubclassOf(typeof(FormBase)))
|
if (this.FallbackStateForm != null && !this.FallbackStateForm.IsSubclassOf(typeof(FormBase)))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("FallbackStateForm is not a subclass of FormBase");
|
throw new ArgumentException("FallbackStateForm is not a subclass of FormBase");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ namespace TelegramBotBase.States
|
|||||||
|
|
||||||
this.FallbackStateForm = fallbackStateForm;
|
this.FallbackStateForm = fallbackStateForm;
|
||||||
|
|
||||||
if (!this.FallbackStateForm.IsSubclassOf(typeof(FormBase)))
|
if (this.FallbackStateForm != null && !this.FallbackStateForm.IsSubclassOf(typeof(FormBase)))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("FallbackStateForm is not a subclass of FormBase");
|
throw new ArgumentException("FallbackStateForm is not a subclass of FormBase");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace TelegramBotBase.States
|
|||||||
|
|
||||||
this.FallbackStateForm = fallbackStateForm;
|
this.FallbackStateForm = fallbackStateForm;
|
||||||
|
|
||||||
if (!this.FallbackStateForm.IsSubclassOf(typeof(FormBase)))
|
if (this.FallbackStateForm != null && !this.FallbackStateForm.IsSubclassOf(typeof(FormBase)))
|
||||||
{
|
{
|
||||||
throw new ArgumentException("FallbackStateForm is not a subclass of FormBase");
|
throw new ArgumentException("FallbackStateForm is not a subclass of FormBase");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user