Skip to content

Commit

Permalink
Default to first Notebook option if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Kévin Commaille authored and tasn committed Jan 21, 2021
1 parent d7b836f commit 4f1f3dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/screens/NotePropertiesScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function NotePropertiesScreen(props: PropsType) {
.sort((a, b) => (a.meta!.name!.toUpperCase() >= b.meta!.name!.toUpperCase()) ? 1 : -1)
.values()
);
const [collection, setCollection] = React.useState<typeof options[0] | undefined>();
const [collection, setCollection] = React.useState((options.length > 0) ? options[0] : undefined);
const syncGate = useSyncGate();
const navigation = useNavigation<NavigationProp>();
const etebase = useCredentials()!;
Expand Down

0 comments on commit 4f1f3dc

Please sign in to comment.