Skip to content

Commit

Permalink
Fixed Issue: no serial number provided
Browse files Browse the repository at this point in the history
Fixed an runtime issue if no serial number is provided by the player

Signed-off-by: Wire82 <[email protected]>
  • Loading branch information
Wire82 committed Jan 24, 2021
1 parent d72c76e commit 4ef8a79
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ public static void propertiesFromPlayer(Map<String, ? super String> prop, Player
String serialNumber = player.serial;
if (serialNumber != null) {
prop.put(Thing.PROPERTY_SERIAL_NUMBER, serialNumber);
} else {
prop.put(Thing.PROPERTY_SERIAL_NUMBER, ""); // If no serial number is provided, write an empty string to
// prevent error during runtime
}
}
}

0 comments on commit 4ef8a79

Please sign in to comment.