From fd7050697d382a247c70db5c3996dd50089935e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Wed, 26 May 2021 15:44:16 +0200 Subject: [PATCH] checks for user table props in table --- .../components/backend/DataTable/Table.svelte | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index 80827b061c..5beef42d90 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -45,10 +45,18 @@ schema[field].editable = false } }) - schema.email.displayName = "Email" - schema.roleId.displayName = "Role" - schema.firstName.displayName = "First Name" - schema.lastName.displayName = "Last Name" + if (schema.email) { + schema.email.displayName = "Email" + } + if (schema.roleId) { + schema.roleId.displayName = "Role" + } + if (schema.firstName) { + schema.firstName.displayName = "First Name" + } + if (schema.lastName) { + schema.lastName.displayName = "Last Name" + } if (schema.status) { schema.status.displayName = "Status" }