Skip to content

Commit 0beb254

Browse files
authored
Remove if check from OnBeforeSerialization
1 parent 769342e commit 0beb254

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Runtime/UDictionary.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,8 @@ public TValue this[TKey key]
139139

140140
void ISerializationCallbackReceiver.OnBeforeSerialize()
141141
{
142-
if (m_keys == null)
143-
{
144-
m_keys = Keys.ToArray();
145-
m_values = Values.ToArray();
146-
}
142+
m_keys = Keys.ToArray();
143+
m_values = Values.ToArray();
147144
}
148145

149146
void ISerializationCallbackReceiver.OnAfterDeserialize()

0 commit comments

Comments
 (0)