Skip to content

Commit

Permalink
possible build failure fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed Aug 18, 2023
1 parent 0fd60fc commit c613d53
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Assets/Tools/SchemaEditorPrefs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ internal class SchemaEditorPrefs

static SchemaEditorPrefs()
{
string json = EditorPrefs.GetString(KEY);
var bytes = System.Text.Encoding.UTF8.GetBytes(json);
PathedItems = JsonSerializer.Deserialize<Dictionary<string, string[]>>(bytes);
string json = EditorPrefs.GetString(KEY, null);

if (json != null)
{
var bytes = System.Text.Encoding.UTF8.GetBytes(json);
PathedItems = JsonSerializer.Deserialize<Dictionary<string, string[]>>(bytes);
}

if (PathedItems == null)
{
Expand Down

0 comments on commit c613d53

Please sign in to comment.