mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-17 13:45:01 +00:00
Fixes UpdateDeviceConfig()
This commit is contained in:
@@ -54,11 +54,11 @@ namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(config.Key));
|
||||
var deviceConfig = ConfigReader.ConfigObject.Devices.FindIndex(d => d.Key.Equals(config.Key));
|
||||
|
||||
if (deviceConfig != null)
|
||||
if (deviceConfig >= 0)
|
||||
{
|
||||
deviceConfig = config;
|
||||
ConfigReader.ConfigObject.Devices[deviceConfig] = config;
|
||||
|
||||
Debug.Console(1, "Updated config of device: '{0}'", config.Key);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user