Skip to content

fix: fix set entry failed at some situations#778

Merged
wewoor merged 1 commit into
mainfrom
fix/entry
Jul 14, 2022
Merged

fix: fix set entry failed at some situations#778
wewoor merged 1 commit into
mainfrom
fix/entry

Conversation

@mortalYoung

Copy link
Copy Markdown
Collaborator

Intro

  • fix set entry failed at some situations

Changes

It's a typeScript problem indeed. The React.ReactNode is different from JSX.Element. This function should have used like

// correct use
molecule.editor.setEntry(<YourComponent />)

rather then

// wrong use
import YourComponent from '../somewhere';
molecule.editor.setEntry(YourComponent)`

but TypeScript will not get a error in wrong usage as the wrong type defined.

Related Issues

Closed #760

@mortalYoung mortalYoung added the bug Something isn't working label Jul 12, 2022
@mortalYoung mortalYoung self-assigned this Jul 12, 2022
@codecov

codecov Bot commented Jul 12, 2022

Copy link
Copy Markdown

Codecov Report

Merging #778 (a37a12a) into main (4d9edb3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #778   +/-   ##
=======================================
  Coverage   91.65%   91.65%           
=======================================
  Files         191      191           
  Lines        5869     5869           
  Branches     1405     1405           
=======================================
  Hits         5379     5379           
  Misses        484      484           
  Partials        6        6           
Impacted Files Coverage Δ
src/services/workbench/editorService.ts 96.86% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d9edb3...a37a12a. Read the comment docs.

@mortalYoung
mortalYoung requested a review from wewoor July 12, 2022 12:17

@wewoor wewoor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wewoor
wewoor merged commit a8b608d into main Jul 14, 2022
@wewoor
wewoor deleted the fix/entry branch July 14, 2022 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Can't change welcome page in editor in latest version

2 participants