diff --git a/packages/bbui/src/Tabs/Tab.svelte b/packages/bbui/src/Tabs/Tab.svelte
index f51ad96e05..627d7e525a 100644
--- a/packages/bbui/src/Tabs/Tab.svelte
+++ b/packages/bbui/src/Tabs/Tab.svelte
@@ -1,40 +1,28 @@
@@ -53,11 +56,12 @@
{#if icon}
@@ -72,7 +76,8 @@
{/if}
{title}
-{#if $selected.title === title}
+
+{#if isSelected}
diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte
index 7d4958db04..6094c93a26 100644
--- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte
@@ -105,10 +105,6 @@
}
onMount(async () => {
- document.fonts.onloadingdone = e => {
- builderStore.loadFonts(e.fontfaces)
- }
-
if (!hasSynced && application) {
try {
await API.syncApp(application)
@@ -149,19 +145,17 @@
/>
- {#key $builderStore?.fonts}
- {#each $layout.children as { path, title }}
-
-
-
- {/each}
- {/key}
+ {#each $layout.children as { path, title }}
+
+
+
+ {/each}
diff --git a/packages/builder/src/stores/builder/builder.js b/packages/builder/src/stores/builder/builder.js
index 055498bc91..d002062da9 100644
--- a/packages/builder/src/stores/builder/builder.js
+++ b/packages/builder/src/stores/builder/builder.js
@@ -14,7 +14,6 @@ export const INITIAL_BUILDER_STATE = {
tourKey: null,
tourStepKey: null,
hoveredComponentId: null,
- fonts: null,
}
export class BuilderStore extends BudiStore {
@@ -37,16 +36,6 @@ export class BuilderStore extends BudiStore {
this.websocket
}
- loadFonts(fontFaces) {
- const ff = fontFaces.map(
- fontFace => `${fontFace.family}-${fontFace.weight}`
- )
- this.update(state => ({
- ...state,
- fonts: [...(state.fonts || []), ...ff],
- }))
- }
-
init(app) {
if (!app?.appId) {
console.error("BuilderStore: No appId supplied for websocket")
diff --git a/packages/server/src/sdk/app/rows/utils.ts b/packages/server/src/sdk/app/rows/utils.ts
index a9df4f89cd..777ebff655 100644
--- a/packages/server/src/sdk/app/rows/utils.ts
+++ b/packages/server/src/sdk/app/rows/utils.ts
@@ -14,7 +14,7 @@ import { makeExternalQuery } from "../../../integrations/base/query"
import { Format } from "../../../api/controllers/view/exporters"
import sdk from "../.."
import { isRelationshipColumn } from "../../../db/utils"
-import { SqlClient, isSQL } from "../../../integrations/utils"
+import { isSQL, SqlClient } from "../../../integrations/utils"
const SQL_CLIENT_SOURCE_MAP: Record = {
[SourceName.POSTGRES]: SqlClient.POSTGRES,
@@ -144,6 +144,10 @@ export async function validate({
throw new Error("Unable to fetch table for validation")
}
const errors: Record = {}
+ const disallowArrayTypes = [
+ FieldType.ATTACHMENT_SINGLE,
+ FieldType.BB_REFERENCE_SINGLE,
+ ]
for (let fieldName of Object.keys(fetchedTable.schema)) {
const column = fetchedTable.schema[fieldName]
const constraints = cloneDeep(column.constraints)
@@ -160,6 +164,10 @@ export async function validate({
if (type === FieldType.OPTIONS && constraints?.inclusion) {
constraints.inclusion.push(null as any, "")
}
+
+ if (disallowArrayTypes.includes(type) && Array.isArray(row[fieldName])) {
+ errors[fieldName] = `Cannot accept arrays`
+ }
let res
// Validate.js doesn't seem to handle array