Skip to content

Commit dddafdf

Browse files
committed
fix missing common.read and common.write
as discussed in #463 `common.read` (and potentially `common.write`) is missing for optional states created by devices adapter. This is because of these two conditions... Overwriting `common.read` if it is not `undefined` does not make much sense. The change will set it to `true` if `common.read` is `undefined` (same for `common.write`).
1 parent ff7fd50 commit dddafdf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src-admin/src/Tabs/ListDevices.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,12 +2458,12 @@ class ListDevices extends Component<ListDevicesProps, ListDevicesState> {
24582458

24592459
if (state.read !== undefined) {
24602460
common.read = state.read;
2461-
} else if (common.read !== undefined) {
2461+
} else if (common.read === undefined) {
24622462
common.read = true;
24632463
}
24642464
if (state.write !== undefined) {
24652465
common.write = state.write;
2466-
} else if (common.write !== undefined) {
2466+
} else if (common.write === undefined) {
24672467
common.write = true;
24682468
}
24692469

0 commit comments

Comments
 (0)