From 220921f293f13a7274bd96bc6aee0f543e1275fb Mon Sep 17 00:00:00 2001 From: Mike Clark Date: Sun, 1 Oct 2023 21:41:51 +0100 Subject: [PATCH] putting mapfield in rules.ts back to the way it was as it isn't needed for this code push --- .../src/components/modals/CreateEncryptionKey.tsx | 4 ++-- packages/loot-core/src/shared/rules.ts | 2 +- upcoming-release-notes/1755.md | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 upcoming-release-notes/1755.md diff --git a/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx b/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx index ce843520069..00e1af49ba0 100644 --- a/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx +++ b/packages/desktop-client/src/components/modals/CreateEncryptionKey.tsx @@ -21,14 +21,14 @@ type CreateEncryptionKeyProps = { modalProps: CommonModalProps; actions: BoundActions; options: { - recreate: boolean; + recreate?: boolean; }; }; export default function CreateEncryptionKey({ modalProps, actions, - options, + options = {}, }: CreateEncryptionKeyProps) { let [password, setPassword] = useState(''); let [loading, setLoading] = useState(false); diff --git a/packages/loot-core/src/shared/rules.ts b/packages/loot-core/src/shared/rules.ts index bc659d72e3e..d0fa730a44a 100644 --- a/packages/loot-core/src/shared/rules.ts +++ b/packages/loot-core/src/shared/rules.ts @@ -45,7 +45,7 @@ export const FIELD_TYPES = new Map( }), ); -export function mapField(field, opts = undefined) { +export function mapField(field, opts) { opts = opts || {}; switch (field) { diff --git a/upcoming-release-notes/1755.md b/upcoming-release-notes/1755.md new file mode 100644 index 00000000000..9a27e1ed88c --- /dev/null +++ b/upcoming-release-notes/1755.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MikesGlitch] +--- + +Convert CreateAccount and CreateEncryptionKey components to TypeScript.