-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #2384: support string-only component for vue #4285
Conversation
app/vue/src/client/preview/render.js
Outdated
@@ -20,6 +20,10 @@ export default function render({ | |||
Vue.config.errorHandler = showException; | |||
|
|||
const component = story(); | |||
|
|||
if (typeof component === 'string') { | |||
component = { template: component }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
component is a const
, you can't reassign it, can you please fix it ?
I think we need an example story as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Codecov Report
@@ Coverage Diff @@
## master #4285 +/- ##
==========================================
- Coverage 40.2% 40.19% -0.02%
==========================================
Files 510 510
Lines 5944 5946 +2
Branches 794 795 +1
==========================================
Hits 2390 2390
- Misses 3169 3170 +1
- Partials 385 386 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Issue: #2384
What I did
Add support for string only component