Skip to content

Commit

Permalink
fix(generator): after schema prop is configured, the exported JSON sc…
Browse files Browse the repository at this point in the history
…hemas are inconsistent (#201)
  • Loading branch information
mengshang918 committed May 4, 2022
1 parent cf9cad1 commit 3fe38d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/generator/src/components/Viewport/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const Viewport = forwardRef<HTMLDivElement, Props>(
*/
useEffect(() => {
schema && !isObjectEmpty(schema) && setUnitedSchema(schema)
setVersion((version) => version + 1)
// 此处请不要添加依赖,schema仅在初始化时进行操作
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
Expand Down

0 comments on commit 3fe38d7

Please sign in to comment.