Merge pull request #197 from shogunpurple/record-saving-bug

fixing record saving bug
This commit is contained in:
Martin McKeaveney 2020-04-03 12:58:40 +01:00 committed by GitHub
commit 28ba1cc785
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -18,6 +18,7 @@
export let onClosed
let errors = []
let selectedModel
const childModelsForModel = compose(flatten, map("children"), get("children"))
@ -29,7 +30,6 @@
? childModelsForModel($store.hierarchy)
: $store.hierarchy.children
let selectedModel
$: {
if (record) {
selectedModel = getExactNodeForKey($store.hierarchy)(record.key)
@ -48,7 +48,6 @@
$: editingRecord =
record ||
editingRecord ||
getNewRecord(
selectedModel,
getCurrentCollectionKey($backendUiStore.selectedRecord)