From 23b60dc1975db38c280d8a123aff97544d1673e0 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:34:21 +0800
Subject: [PATCH] TODO#139890 FAQ 常見問題 1-文案調整

---
 PAMapp/node_modules/@babel/helper-remap-async-to-generator/lib/index.js |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/PAMapp/node_modules/@babel/helper-remap-async-to-generator/lib/index.js b/PAMapp/node_modules/@babel/helper-remap-async-to-generator/lib/index.js
index 72f0438..063c433 100644
--- a/PAMapp/node_modules/@babel/helper-remap-async-to-generator/lib/index.js
+++ b/PAMapp/node_modules/@babel/helper-remap-async-to-generator/lib/index.js
@@ -27,25 +27,19 @@
     wrapAwait
   }) {
     const argument = path.get("argument");
-
-    if (path.parentPath.isYieldExpression()) {
-      path.replaceWith(argument.node);
-      return;
-    }
-
     path.replaceWith(yieldExpression(wrapAwait ? callExpression(cloneNode(wrapAwait), [argument.node]) : argument.node));
   }
 
 };
 
-function _default(path, helpers, noNewArrows) {
+function _default(path, helpers, noNewArrows, ignoreFunctionLength) {
   path.traverse(awaitVisitor, {
     wrapAwait: helpers.wrapAwait
   });
   const isIIFE = checkIsIIFE(path);
   path.node.async = false;
   path.node.generator = true;
-  (0, _helperWrapFunction.default)(path, cloneNode(helpers.wrapAsync), noNewArrows);
+  (0, _helperWrapFunction.default)(path, cloneNode(helpers.wrapAsync), noNewArrows, ignoreFunctionLength);
   const isProperty = path.isObjectMethod() || path.isClassMethod() || path.parentPath.isObjectProperty() || path.parentPath.isClassProperty();
 
   if (!isProperty && !isIIFE && path.isExpression()) {

--
Gitblit v1.8.0