fix: 修复plugin-layout把未缓存页面当做undefined丢进缓存列表出现的问题

This commit is contained in:
wanchun 2022-08-18 10:41:44 +08:00
parent 1c786032aa
commit 5a18b7dd72

View File

@ -49,7 +49,7 @@ export default defineComponent({
// route
const name = changePageComName(route);
// namekeep-aliveinclude
if (!keepAlivePages.value.includes(name)) {
if (name && !keepAlivePages.value.includes(name)) {
keepAlivePages.value = [...keepAlivePages.value, name];
}
});