merge ipaddress fix from esp8266-react

This commit is contained in:
proddy
2021-03-08 12:54:44 +01:00
parent 9d5bd11d26
commit 0aefaaef55
5 changed files with 25 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
#include <Arduino.h>
#include <IPAddress.h>
#include <IPUtils.h>
#include <ArduinoJson.h>
class JsonUtils {
@@ -20,7 +21,7 @@ class JsonUtils {
}
}
static void writeIP(JsonObject & root, const String & key, const IPAddress & ip) {
if (ip != INADDR_NONE) {
if (IPUtils::isSet(ip)) {
root[key] = ip.toString();
}
}