Skip to content

Commit b75cee0

Browse files
committed
Improving readIP function
Change logic to first check if JsonVariant is a String.
1 parent 348e65b commit b75cee0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WiFiSettingsService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void WiFiSettingsService::reconfigureWiFiConnection() {
7777
}
7878

7979
void WiFiSettingsService::readIP(JsonObject& root, String key, IPAddress& _ip){
80-
if ( root[key].isNull() || !_ip.fromString(root[key].as<String>())){
80+
if ( !root[key].is<String>() || !_ip.fromString(root[key].as<String>())){
8181
_ip = INADDR_NONE;
8282
}
8383
}

0 commit comments

Comments
 (0)