v1.0 with SW PWA enabled
This commit is contained in:
17
frontend/node_modules/@babel/traverse/lib/path/modification.js
generated
vendored
17
frontend/node_modules/@babel/traverse/lib/path/modification.js
generated
vendored
@ -52,8 +52,8 @@ function insertBefore(nodes_) {
|
||||
} else if (this.isStatementOrBlock()) {
|
||||
const node = this.node;
|
||||
const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
|
||||
this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
|
||||
return this.unshiftContainer("body", nodes);
|
||||
const [blockPath] = this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
|
||||
return blockPath.unshiftContainer("body", nodes);
|
||||
} else {
|
||||
throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
|
||||
}
|
||||
@ -153,8 +153,8 @@ function insertAfter(nodes_) {
|
||||
} else if (this.isStatementOrBlock()) {
|
||||
const node = this.node;
|
||||
const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
|
||||
this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
|
||||
return this.pushContainer("body", nodes);
|
||||
const [blockPath] = this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
|
||||
return blockPath.pushContainer("body", nodes);
|
||||
} else {
|
||||
throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
|
||||
}
|
||||
@ -197,15 +197,16 @@ function _verifyNodeList(nodes) {
|
||||
}
|
||||
function unshiftContainer(listKey, nodes) {
|
||||
_removal._assertUnremoved.call(this);
|
||||
nodes = _verifyNodeList.call(this, nodes);
|
||||
const verifiedNodes = _verifyNodeList.call(this, nodes);
|
||||
const container = this.node[listKey];
|
||||
const path = _index.default.get({
|
||||
parentPath: this,
|
||||
parent: this.node,
|
||||
container: this.node[listKey],
|
||||
container,
|
||||
listKey,
|
||||
key: 0
|
||||
}).setContext(this.context);
|
||||
return _containerInsertBefore.call(path, nodes);
|
||||
return _containerInsertBefore.call(path, verifiedNodes);
|
||||
}
|
||||
function pushContainer(listKey, nodes) {
|
||||
_removal._assertUnremoved.call(this);
|
||||
@ -214,7 +215,7 @@ function pushContainer(listKey, nodes) {
|
||||
const path = _index.default.get({
|
||||
parentPath: this,
|
||||
parent: this.node,
|
||||
container: container,
|
||||
container,
|
||||
listKey,
|
||||
key: container.length
|
||||
}).setContext(this.context);
|
||||
|
||||
Reference in New Issue
Block a user