mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 11:09:14 +00:00
Safeguard the plugins use to avoid the flatMap error occurred during hot reloading (#23831)
This commit is contained in:
parent
1fa5641590
commit
13ab5af508
@ -116,7 +116,7 @@ const AppRouter = () => {
|
||||
|
||||
{/* Render APP position plugin routes (they handle their own layouts) */}
|
||||
{isAuthenticated &&
|
||||
plugins.flatMap((plugin) => {
|
||||
plugins?.flatMap((plugin) => {
|
||||
const routes = plugin.getRoutes?.() || [];
|
||||
// Filter routes with APP position
|
||||
const appRoutes = routes.filter(
|
||||
|
||||
@ -292,7 +292,7 @@ const AuthenticatedAppRouter: FunctionComponent = () => {
|
||||
|
||||
// Get all plugin routes that should be in AUTHENTICATED_ROUTE position
|
||||
const pluginRoutes = useMemo(() => {
|
||||
return plugins.flatMap((plugin) => {
|
||||
return plugins?.flatMap((plugin) => {
|
||||
const routes = plugin.getRoutes?.() || [];
|
||||
|
||||
// Filter routes that don't have position or have AUTHENTICATED_ROUTE position
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user