From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:48:15 +0800
Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改

---
 PAMapp/node_modules/@babel/helper-function-name/lib/index.js |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/PAMapp/node_modules/@babel/helper-function-name/lib/index.js b/PAMapp/node_modules/@babel/helper-function-name/lib/index.js
index 59e88e9..749812f 100644
--- a/PAMapp/node_modules/@babel/helper-function-name/lib/index.js
+++ b/PAMapp/node_modules/@babel/helper-function-name/lib/index.js
@@ -5,8 +5,6 @@
 });
 exports.default = _default;
 
-var _helperGetFunctionArity = require("@babel/helper-get-function-arity");
-
 var _template = require("@babel/template");
 
 var _t = require("@babel/types");
@@ -16,6 +14,7 @@
   cloneNode,
   identifier,
   isAssignmentExpression,
+  isAssignmentPattern,
   isFunction,
   isIdentifier,
   isLiteral,
@@ -23,10 +22,17 @@
   isObjectMethod,
   isObjectProperty,
   isRegExpLiteral,
+  isRestElement,
   isTemplateLiteral,
   isVariableDeclarator,
   toBindingIdentifierName
 } = _t;
+
+function getFunctionArity(node) {
+  const count = node.params.findIndex(param => isAssignmentPattern(param) || isRestElement(param));
+  return count === -1 ? node.params.length : count;
+}
+
 const buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
   (function (FUNCTION_KEY) {
     function FUNCTION_ID() {
@@ -103,7 +109,7 @@
       }).expression;
       const params = template.callee.body.body[0].params;
 
-      for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
+      for (let i = 0, len = getFunctionArity(method); i < len; i++) {
         params.push(scope.generateUidIdentifier("x"));
       }
 
@@ -141,7 +147,7 @@
   parent,
   scope,
   id
-}, localBinding = false) {
+}, localBinding = false, supportUnicodeId = false) {
   if (node.id) return;
 
   if ((isObjectProperty(parent) || isObjectMethod(parent, {
@@ -180,6 +186,10 @@
     return;
   }
 
+  if (!supportUnicodeId && isFunction(node) && /[\uD800-\uDFFF]/.test(name)) {
+    return;
+  }
+
   name = toBindingIdentifierName(name);
   id = identifier(name);
   id[NOT_LOCAL_BINDING] = true;

--
Gitblit v1.8.0