Skip to content

Commit

Permalink
Fix crash on empty device list
Browse files Browse the repository at this point in the history
Closes #30
  • Loading branch information
Domi04151309 committed Nov 29, 2021
1 parent fdb826b commit 2ee2d1a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 2ee2d1a

Please sign in to comment.