diff --git a/app/src/main/java/io/github/domi04151309/home/helpers/Devices.kt b/app/src/main/java/io/github/domi04151309/home/helpers/Devices.kt index 15baaa69..69cf25e4 100644 --- a/app/src/main/java/io/github/domi04151309/home/helpers/Devices.kt +++ b/app/src/main/java/io/github/domi04151309/home/helpers/Devices.kt @@ -37,7 +37,7 @@ class Devices(private val context: Context) { private val deviceOrder: JSONArray get() { if (!data.has("order")) { - data.put("order", devicesObject.names()) + data.put("order", devicesObject.names() ?: JSONArray()) } return data.getJSONArray("order") }