fixed varname in ExtentionBoat.GetDataForSave

This commit is contained in:
Nikita Potapov 2022-11-30 08:37:17 +04:00
parent 7d27bcd94f
commit 681b60f6a6

View File

@ -51,9 +51,9 @@ namespace Boats
/// <returns></returns>
public static string GetDataForSave(this DrawingBoat drawingBoat)
{
var car = drawingBoat.Boat;
var str = $"{car.Speed}{_separatorForObject}{car.Weight}{_separatorForObject}{car.BodyColor.Name}";
if (car is not EntityCatamaran catamaran)
var boat = drawingBoat.Boat;
var str = $"{boat.Speed}{_separatorForObject}{boat.Weight}{_separatorForObject}{boat.BodyColor.Name}";
if (boat is not EntityCatamaran catamaran)
{
return str;
}