Small warning.

This commit is contained in:
Burak Kaan Köse
2025-12-28 07:27:27 +01:00
parent 51540c89d1
commit 0f6aa66b21
+1 -1
View File
@@ -41,7 +41,7 @@ public partial class BasePage : Page, IRecipient<LanguageChanged>
public abstract class BasePage<T> : BasePage where T : CoreBaseViewModel
{
public T ViewModel { get; } = WinoApplication.Current.Services.GetService<T>();
public T ViewModel { get; } = WinoApplication.Current.Services.GetService<T>() ?? throw new ArgumentException($"Can't resolve '{typeof(T)}' as view model.");
protected BasePage()
{