Skip to content

Commit

Permalink
Fix unit test SavePicture function (dotnet-architecture#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadyNagy authored Jul 28, 2020
1 parent 3ee9fff commit 24cf9be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Infrastructure/Services/WebFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public WebFileSystem(string url)

public async Task<bool> SavePicture(string pictureName, string pictureBase64)
{
if (!await UploadFile(pictureName, Convert.FromBase64String(pictureBase64)))
if (string.IsNullOrEmpty(pictureBase64) || !await UploadFile(pictureName, Convert.FromBase64String(pictureBase64)))
{
return false;
}
Expand Down

0 comments on commit 24cf9be

Please sign in to comment.