fix: skip transform delete something.includes (#11530)

This commit is contained in:
Huáng Jùnliàng
2020-05-07 06:50:59 -04:00
committed by GitHub
parent 8aa5e574a0
commit b8a6145e50
7 changed files with 9 additions and 0 deletions

View File

@@ -358,6 +358,8 @@ export default declare((api, options, dirname) => {
enter(path) {
if (!injectCoreJS) return;
if (!path.isReferenced()) return;
// skip transforming `delete something.includes`
if (path.parentPath.isUnaryExpression({ operator: "delete" })) return;
const { node } = path;
const { object } = node;