Merge pull request #1115 from nofficalfs/Dev-Feat-HookTension

fix: recursion.
This commit is contained in:
Spmario233 2024-03-21 19:15:28 +08:00 committed by GitHub
commit 15d4092b59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)