Skip to content

Commit

Permalink
Fix JSON import not working in the flag editor
Browse files Browse the repository at this point in the history
oooops
  • Loading branch information
pizzaboxer committed Jul 9, 2024
1 parent 670dc70 commit a7d2a2c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,12 @@ private void ImportJSON(string json)
if (App.FastFlags.Prop.ContainsKey(pair.Key) && !overwriteConflicting)
continue;

// TODO - error message, i just had to hastily add this in
// as i'm currently testing 2.7.0 for release and all translations
// are already done
if (pair.Value is not string)
var val = pair.Value.ToString();

if (val is null)
continue;

if (!ValidateFlagEntry(pair.Key, (string)pair.Value))
if (!ValidateFlagEntry(pair.Key, val))
continue;

App.FastFlags.SetValue(pair.Key, pair.Value);
Expand Down

1 comment on commit a7d2a2c

@Jbloxs
Copy link

@Jbloxs Jbloxs commented on a7d2a2c Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Please sign in to comment.