From d89eee8bb72085cfe7c3bdce0e57e7bc2b5fe9ca Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Wed, 13 Mar 2024 21:16:14 +0000 Subject: [PATCH] fix(nc-gui): Invalid prop: type check failed for prop "baseRole". --- .../dashboard/TreeView/ProjectWrapper.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue b/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue index 1d1a6930f8..36ee2a4267 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ProjectWrapper.vue @@ -2,15 +2,20 @@ import type { BaseType } from 'nocodb-sdk' import { ProjectInj, ProjectRoleInj } from '#imports' -const props = defineProps<{ - baseRole: string | string[] - base: BaseType -}>() +const props = withDefaults( + defineProps<{ + baseRole: string | string[] + base: BaseType + }>(), + { + baseRole: '', + }, +) const baseRole = toRef(props, 'baseRole') const base = toRef(props, 'base') -provide(ProjectRoleInj, baseRole) +provide(ProjectRoleInj, baseRole ?? '') provide(ProjectInj, base)