234 attempt to fix js error Uncaught SyntaxError: Unexpected identifier 'hidden'

This commit is contained in:
2026-04-27 17:57:24 +03:00
parent 8a32a0d5f0
commit 74c073bd7e
149 changed files with 14361 additions and 8886 deletions
+18
View File
@@ -0,0 +1,18 @@
component {
/**
* Walks the metadata chain to check if an object extends a given class.
* Works around Lucee's isInstanceOf() bug with mapped paths.
*/
public boolean function extendsClass(required any obj, required string className) {
if (!isObject(arguments.obj)) return false;
var meta = getMetadata(arguments.obj);
while (structKeyExists(meta, "name")) {
if (listLast(meta.name, ".") == listLast(arguments.className, ".")) return true;
if (!structKeyExists(meta, "extends")) break;
meta = meta.extends;
}
return false;
}
}