Skip to content

Commit d22c39f

Browse files
committed
added one condition
1 parent 7db228a commit d22c39f

File tree

1 file changed

+2
-3
lines changed
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes

1 file changed

+2
-3
lines changed

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,12 @@
123123
// Reactive statements
124124
$: collections = collectionList?.collections?.filter((n) => n.$id !== $collection.$id) ?? [];
125125
126-
$: if (editing && data.twoWay !== undefined) {
127-
way = data.twoWay ? 'two' : 'one';
128-
}
129126
$: if (!editing && way) {
130127
data.twoWay = way === 'two';
131128
if (way === 'two' && !data.twoWayKey) {
132129
data.twoWayKey = camelize($collection.name);
130+
} else if (way === 'one') {
131+
data.twoWayKey = undefined;
133132
}
134133
}
135134

0 commit comments

Comments
 (0)