From 3aa92c76cc0da3ed7154e80b8722b1253c3576cb Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 16 May 2022 04:11:10 +0100 Subject: [PATCH] avoid `extends` error in `ufuzz` (#5447) --- test/ufuzz/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index 37dce302..c5151996 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1805,7 +1805,7 @@ function createClassLiteral(recurmax, stmtDepth, canThrow, name) { if (canThrow && rng(20) == 0) { s += p; } else { - s += "(typeof " + p + ' == "function" && typeof ' + p + '.prototype == "object" ? ' + p + " : function() {})"; + s += "(typeof " + p + ' == "function" && typeof ' + p + '.prototype == "object" && ' + p + ".constructor === Function ? " + p + " : function() {})"; } } s += " {\n";