3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

fix crash with map

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-10-09 13:17:48 +00:00 committed by GitHub
parent 6548379369
commit 12d59bc238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -538,6 +538,7 @@ const baseValues = {
return math_constants[str.toLowerCase()] ?? "";
},
map(obj, key) {
if (typeof obj !== "object" || typeof key !== "string" || typeof obj === "function" || !obj) return "";
if (Array.isArray(obj)) {
return obj.map((tobj) => tobj[key]);
}