Skip to content

Commit 3c8e463

Browse files
committed
Formatting fix
1 parent d95ba37 commit 3c8e463

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes

src/routes/(console)/project-[region]-[project]/databases/database-[database]/(entity)/views/indexes/create.svelte

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@
7474
{ value: DatabasesIndexType.Fulltext, label: 'Fulltext' },
7575
{ value: DatabasesIndexType.Spatial, label: 'Spatial' }
7676
].filter((type) => {
77-
if (type.value === DatabasesIndexType.Spatial && !$regionalConsoleVariables?.supportForSpatials)
77+
if (
78+
type.value === DatabasesIndexType.Spatial &&
79+
!$regionalConsoleVariables?.supportForSpatials
80+
)
7881
return false;
7982
return true;
8083
})
@@ -98,7 +101,11 @@
98101
// and the field already is not spatial type
99102
$effect(() => {
100103
const firstField = entity.fields.find((field) => field.key === fieldList.at(0)?.value);
101-
if (selectedType === DatabasesIndexType.Spatial && firstField && !isSpatialType(firstField)) {
104+
if (
105+
selectedType === DatabasesIndexType.Spatial &&
106+
firstField &&
107+
!isSpatialType(firstField)
108+
) {
102109
fieldList = [{ value: '', order: null, length: null }];
103110
}
104111
});
@@ -160,7 +167,11 @@
160167
export async function create() {
161168
const fieldType = terminology.field.lower.singular;
162169
163-
if (!key || !selectedType || (selectedType !== DatabasesIndexType.Spatial && addFieldDisabled)) {
170+
if (
171+
!key ||
172+
!selectedType ||
173+
(selectedType !== DatabasesIndexType.Spatial && addFieldDisabled)
174+
) {
164175
addNotification({
165176
type: 'error',
166177
message: `Selected ${fieldType} key or type invalid`

0 commit comments

Comments
 (0)