Closed johanazhu closed 1 year ago
怎么复现呢?看起来都是字符串
怎么复现呢?看起来都是字符串
就把 ant-design-pro + qiankun 的项目升级到最新版(引用了keep-alive)就报错了 报错信息如下: 当我调试时,成这样:
把 const fullPath = getFullPath(item.path?.toLowerCase(), parentPath?.toLowerCase());
就可以了
可是 item.path 为什么为 undefined?
info - + @alita/plugins 3.2.22 info - + alita 3.2.27
这个版本先规避了,但是还是希望跟进 tem.path 为什么为 undefined
info - + @alita/plugins 3.2.22 info - + alita 3.2.27
这个版本先规避了,但是还是希望跟进 tem.path 为什么为 undefined
嗯嗯,我再查查是啥原因
找到原因了,如果在 conf/routes.ts
中配置404 页面,也就是 { component: './404' },当没有 path 参数,访问 item.path 自然是 undefined
ok,那就明白了,更新版本就可以。🌹
ok,那就明白了,更新版本就可以。🌹
🌹🌹
报错信息如下: Cannot read properties of undefined (reading 'toLowerCase')
所属代码块: https://github.com/alitajs/alita/blob/master/packages/plugins/templates/keepalive/context.tpl#L148