Skip to content

Commit

Permalink
backport #3880
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jan 12, 2024
1 parent 86f7898 commit 90e071f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions jsx-runtime/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ let vnodeId = 0;
* @param {VNode['type']} type
* @param {VNode['props']} props
* @param {VNode['key']} [key]
* @param {string} [__source]
* @param {string} [__self]
* @param {unknown} [isStaticChildren]
* @param {unknown} [__source]
* @param {unknown} [__self]
*/
function createVNode(type, props, key, __source, __self) {
function createVNode(type, props, key, isStaticChildren, __source, __self) {
// We'll want to preserve `ref` in props to get rid of the need for
// forwardRef components in the future, but that should happen via
// a separate PR.
Expand Down
4 changes: 2 additions & 2 deletions jsx-runtime/test/browser/jsx-runtime.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, createElement, createRef } from 'preact';
import { createElement, createRef } from 'preact';
import { jsx, jsxs, jsxDEV, Fragment } from 'preact/jsx-runtime';
import { setupScratch, teardown } from '../../../test/_util/helpers';

Expand Down Expand Up @@ -32,7 +32,7 @@ describe('Babel jsx/jsxDEV', () => {
});

it('should set __source and __self', () => {
const vnode = jsx('div', { class: 'foo' }, 'key', 'source', 'self');
const vnode = jsx('div', { class: 'foo' }, 'key', false, 'source', 'self');
expect(vnode.__source).to.equal('source');
expect(vnode.__self).to.equal('self');
});
Expand Down

0 comments on commit 90e071f

Please sign in to comment.