Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Tencent/omi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 95e2d324a0a5be0e291b98a3516e984017cc4983
Choose a base ref
...
head repository: Tencent/omi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 55ef0d7cf8628b6007c98684283cfb2ed375295e
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Jan 12, 2024

  1. Copy the full SHA
    55ef0d7 View commit details
Showing with 6 additions and 5 deletions.
  1. +1 −1 packages/omi/package.json
  2. +1 −1 packages/omi/src/index.ts
  3. +2 −1 packages/omi/src/vdom.ts
  4. +2 −2 packages/omi/test/base.test.jsx
2 changes: 1 addition & 1 deletion packages/omi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "omi",
"version": "7.5.1",
"version": "7.5.2",
"scripts": {
"start": "vite",
"dev-vite": "vite",
2 changes: 1 addition & 1 deletion packages/omi/src/index.ts
Original file line number Diff line number Diff line change
@@ -18,4 +18,4 @@ export { Signal } from './signal'
export { css } from './css-tag'
export { mixin } from './options'
export { registerDirective } from './directive'
export const version = '7.5.1'
export const version = '7.5.2'
3 changes: 2 additions & 1 deletion packages/omi/src/vdom.ts
Original file line number Diff line number Diff line change
@@ -80,7 +80,8 @@ export function createElement(
nodeName = (nodeName as unknown as Component).tagName
} else {
// function component
return nodeName(attributes, children)
attributes.children = children
return nodeName(attributes)
}
}

4 changes: 2 additions & 2 deletions packages/omi/test/base.test.jsx
Original file line number Diff line number Diff line change
@@ -501,9 +501,9 @@ describe('base', () => {

it('rendering function 3', () => {

function ChildComponent(props, children) {
function ChildComponent(props) {
return (
<span>{props.msg}{children}</span>
<span>{props.msg}{props.children}</span>
)
}