ChaoquanTao commented on code in PR #16594:
URL: 
https://github.com/apache/dolphinscheduler/pull/16594#discussion_r1772888185


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/utils/SwitchTaskUtils.java:
##########
@@ -40,9 +40,16 @@ public class SwitchTaskUtils {
 
     private static final NashornSandbox sandbox;
     private static final String rgex = "['\"]*\\$\\{(.*?)\\}['\"]*";
+    public static final String NASHORN_POLYFILL_ARRAY_PROTOTYPE_INCLUDES =
+            "if (!Array.prototype.includes) { 
Object.defineProperty(Array.prototype, 'includes', { value: 
function(valueToFind, fromIndex) { if (this == null) { throw new 
TypeError('\"this\" is null or not defined'); } var o = Object(this); var len = 
o.length >>> 0; if (len === 0) { return false; } var n = fromIndex | 0; var k = 
Math.max(n >= 0 ? n : len - Math.abs(n), 0); function sameValueZero(x, y) { 
return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) 
&& isNaN(y)); } while (k < len) { if (sameValueZero(o[k], valueToFind)) { 
return true; } k++; } return false; } }); }";

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to