Skip to content

Commit 0e883eb

Browse files
committed
fix: #23 this.pre is undefined cause error
1 parent f203a30 commit 0e883eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export default class VueRouterKeepAliveHelper{
161161
this.replaceStay.includes(this.replacePrePath)
162162
);
163163
if (shouldDestroy) {
164-
this.pre.$keepAliveDestroy();
164+
this.pre?.$keepAliveDestroy();
165165
}
166166
this.setState(this.stackPointer);
167167
this.historyStack.push(vm, this.stackPointer);

0 commit comments

Comments
 (0)