Fixed _containerInsertAfter setting path key as stringified index (#7213)
This commit is contained in:
parent
ca86648726
commit
79c84f2f9b
5
packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/7178/input.js
vendored
Normal file
5
packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/7178/input.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
const title = "Neem contact op";
|
||||
|
||||
async function action() {
|
||||
return <Contact title={title} />;
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
"transform-async-to-generator",
|
||||
"transform-react-jsx",
|
||||
"transform-react-constant-elements"
|
||||
]
|
||||
}
|
||||
16
packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/7178/output.js
vendored
Normal file
16
packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/7178/output.js
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
const title = "Neem contact op";
|
||||
|
||||
function action() {
|
||||
return _action.apply(this, arguments);
|
||||
}
|
||||
|
||||
var _ref = React.createElement(Contact, {
|
||||
title: title
|
||||
});
|
||||
|
||||
function _action() {
|
||||
_action = babelHelpers.asyncToGenerator(function* () {
|
||||
return _ref;
|
||||
});
|
||||
return _action.apply(this, arguments);
|
||||
}
|
||||
@ -56,7 +56,7 @@ export function _containerInsert(from, nodes) {
|
||||
this.container.splice(from, 0, ...nodes);
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
const to = from + i;
|
||||
const path = this.getSibling(`${to}`);
|
||||
const path = this.getSibling(to);
|
||||
paths.push(path);
|
||||
|
||||
if (this.context && this.context.queue) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user