Fix empty userName when running WebRazorPages by adding default username. (#80)

This commit is contained in:
Nud
2018-04-03 21:35:11 +07:00
committed by Steve Smith
parent 2c20807487
commit 0caba1a8e7
2 changed files with 2 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ namespace Microsoft.eShopWeb.RazorPages.ViewComponents
{
return User.Identity.Name;
}
return GetBasketIdFromCookie();
return GetBasketIdFromCookie() ?? Constants.DEFAULT_USERNAME;
}
private string GetBasketIdFromCookie()