diff --git a/source/renderer/components/vault/GroupsList.tsx b/source/renderer/components/vault/GroupsList.tsx index cf7c885e..3f04d631 100644 --- a/source/renderer/components/vault/GroupsList.tsx +++ b/source/renderer/components/vault/GroupsList.tsx @@ -215,9 +215,6 @@ export const GroupsList = () => { if (groupEditID !== null && groupEditID !== -1) { onRenameGroup(groupEditID, newGroupName); } else { - if (!parentGroupID) { - throw new Error("No parent ID specified"); - } onCreateGroup(parentGroupID, newGroupName); } closeEditDialog(); diff --git a/source/renderer/components/vault/VaultContext.tsx b/source/renderer/components/vault/VaultContext.tsx index f999421c..7807a5d9 100644 --- a/source/renderer/components/vault/VaultContext.tsx +++ b/source/renderer/components/vault/VaultContext.tsx @@ -37,7 +37,7 @@ export interface VaultContextState { batchDeleteItems: (action: { groupIDs?: Array; entryIDs?: Array; }) => void; onCollapseGroup: (group: GroupTreeNodeInfo) => void; - onCreateGroup: (parentID: GroupID, groupTitle: string) => void; + onCreateGroup: (parentID: GroupID | null, groupTitle: string) => void; onExpandGroup: (group: GroupTreeNodeInfo) => void; onSelectGroup: (groupID: GroupID | null) => void; onGroupFilterTermChange: (term: string) => void;