Skip to content

Commit

Permalink
Merge pull request #3459 from preactjs/fix-jsxDev-source
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored Feb 19, 2022
2 parents 77c6243 + 28ce61c commit df2dbd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jsx-runtime/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ let vnodeId = 0;
* @param {VNode['type']} type
* @param {VNode['props']} props
* @param {VNode['key']} [key]
* @param {string} [__source]
* @param {string} [__self]
* @param {string} [__source]
*/
function createVNode(type, props, key, __source, __self) {
function createVNode(type, props, key, __self, __source) {
// 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
2 changes: 1 addition & 1 deletion jsx-runtime/test/browser/jsx-runtime.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,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', 'self', 'source');
expect(vnode.__source).to.equal('source');
expect(vnode.__self).to.equal('self');
});
Expand Down

0 comments on commit df2dbd8

Please sign in to comment.