From 2b7ba01fd2334f723806084764a9fa0641190524 Mon Sep 17 00:00:00 2001 From: Rintim Date: Thu, 21 Mar 2024 13:18:40 +0800 Subject: [PATCH] fix: recursion. --- noname/library/assembly/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noname/library/assembly/index.js b/noname/library/assembly/index.js index fe427964c..391ab4845 100644 --- a/noname/library/assembly/index.js +++ b/noname/library/assembly/index.js @@ -62,7 +62,7 @@ export class NonameAssembly extends Array { // if (typeof name !== "string" || name.length === 0) throw new Error("you can't add a anonymous function to assembly.") if (typeof name !== "string" || name.length === 0) { - Array.prototype.add.call(this, content) + if (!this.includes(content)) Array.prototype.push.call(this, content) } else if (!this.has(name)) { this.#record.set(name, this.length)