diff --git a/openhis-ui-vue3/src/layout/components/Sidebar/SidebarItem.vue b/openhis-ui-vue3/src/layout/components/Sidebar/SidebarItem.vue index b6a3f7e3..6637f67f 100644 --- a/openhis-ui-vue3/src/layout/components/Sidebar/SidebarItem.vue +++ b/openhis-ui-vue3/src/layout/components/Sidebar/SidebarItem.vue @@ -86,8 +86,13 @@ function resolvePath(routePath, routeQuery) { return props.basePath } if (routeQuery) { - let query = JSON.parse(routeQuery); - return { path: getNormalPath(props.basePath + '/' + routePath), query: query } + try { + let query = JSON.parse(routeQuery); + return { path: getNormalPath(props.basePath + '/' + routePath), query: query } + } catch (e) { + console.error('Failed to parse routeQuery:', routeQuery, e); + return getNormalPath(props.basePath + '/' + routePath) + } } return getNormalPath(props.basePath + '/' + routePath) }