Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix: 修复页面组件不能命名为 Page 的问题
Browse files Browse the repository at this point in the history
fix: #158
  • Loading branch information
Darmody committed Aug 28, 2019
1 parent 3b57566 commit 9237dac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/remax-cli/src/build/plugins/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export default () => ({
t.isClassDeclaration(path.node.declaration)
) {
const declaration = path.node.declaration;
const pageId =
declaration.id ||
path.scope.generateUidIdentifierBasedOnNode(path.node);
const pageId = path.scope.generateUidIdentifierBasedOnNode(path.node);
declaration.id = pageId;
path.replaceWith(declaration);
pageConfigExpression(path, pageId);
Expand Down

0 comments on commit 9237dac

Please sign in to comment.