Skip to content

Commit

Permalink
fix(vue3): codegen function as prop value
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Apr 9, 2022
1 parent e1c5d0e commit 5ec9955
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/histoire/src/client/app/codegen/vue3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ async function printVNode (vnode: VNode): Promise<string[]> {
if (typeof value === 'string' && value.startsWith('{{') && value.endsWith('}}')) {
// It was formatted from auto building object (slot props)
serialized = [value.substring(2, value.length - 2).trim()]
} else if (typeof value === 'function') {
serialized = [value.toString()]
} else {
serialized = serializeAndCleanJs(value)
}
Expand Down

0 comments on commit 5ec9955

Please sign in to comment.