Skip to content

Commit d330ced

Browse files
committed
Maybe...
1 parent 5746cb5 commit d330ced

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/FirebaseArduino.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ FirebaseObject FirebaseArduino::readEvent() {
179179
String event = client->readStringUntil('\n').substring(6);
180180
client->readStringUntil('\n'); // consume separator
181181
FirebaseObject obj = FirebaseObject(event.c_str());
182-
obj.getJsonVariant().asObject().set("type", type);
182+
if (NULL != type) {
183+
obj.getJsonVariant().as<JsonObject&>().set("type", type);
184+
}
183185
return obj;
184186
}
185187

0 commit comments

Comments
 (0)