Skip to content

Commit

Permalink
Fix storage retrieval returning true even if value is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvinas01 committed Oct 18, 2023
1 parent 55005a3 commit 51e904f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Packages/com.chark.game-management/Runtime/Storage/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public virtual bool TryGetValue<TValue>(string path, out TValue value)
return false;
}

if (serializer.TryDeserializeValue(stringValue, out TValue deserializedValue))
if (serializer.TryDeserializeValue(stringValue, out TValue deserializedValue) == false)
{
value = deserializedValue;
return true;
return false;
}

value = deserializedValue;
return true;
}

Expand Down

0 comments on commit 51e904f

Please sign in to comment.