Fix JSON parse bug with shop listing

This commit is contained in:
Michael 2017-02-09 19:00:26 -05:00
parent f0b7634d52
commit d6b2b15526

View file

@ -145,7 +145,7 @@ namespace ShiftOS.WinForms.Applications
var contents = JsonConvert.DeserializeObject<Dictionary<string, object>>(msg.Contents);
if((string)contents["shop"] == CurrentShop.Name)
{
CurrentShop.Items.Add((ShopItem)contents["itemdata"]);
CurrentShop.Items.Add(JsonConvert.DeserializeObject<ShopItem>(JsonConvert.SerializeObject(contents["itemdata"])));
this.Invoke(new Action(PopulateShopView));
}
}