possible fix for shopping list

This commit is contained in:
willyb321
2018-07-06 07:28:23 +10:00
parent fb073acdc3
commit 87ead595c6

View File

@@ -83,6 +83,9 @@ export default class ModalShoppingList extends TranslatedComponent {
return this.setState({ failed: true });
}
const cmdrs = JSON.parse(res.text);
if (!this.state.cmdrName) {
this.setState({ cmdrName: cmdrs[0] });
}
this.setState({ cmdrs }, () => {
Persist.setCmdr({ selected: this.state.cmdrName, cmdrs });
});