-
Notifications
You must be signed in to change notification settings - Fork 2k
Fixed a NullReferenceException when starting application with empty shell on Windows #28879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
6a805b9
03a21c2
6e5ca0d
9140fbe
e16026f
164f7cf
9f8d3b3
6385aca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -207,6 +207,12 @@ public override bool Equals(object obj) => | |
|
|
||
| internal void SwitchShellItem(ShellItem newItem, bool animate = true) | ||
| { | ||
| if (newItem is null) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the behavior on other platforms? Would be nice to align the behavior and throw the same exception with the same message if possible.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jsuarezruiz, On Android, the empty Shell throws a similar exception. |
||
| throw new InvalidOperationException("Active Shell Item not set. Have you added any Shell Items to your Shell?"); | ||
|
|
||
| if (newItem.CurrentItem is null) | ||
| throw new InvalidOperationException($"Content not found for active {newItem}. Title: {newItem.Title}. Route: {newItem.Route}."); | ||
|
|
||
| var navItems = FlyoutItems.OfType<NavigationViewItemViewModel>(); | ||
|
|
||
| // Implicit items aren't items that are surfaced to the user | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.