server: fix undefined variable in getOneApId

This is a fixup for commit 48fd543d0f.

closes FoundKeyGang/FoundKey#365
This commit is contained in:
Johann150 2023-03-22 18:30:56 +01:00
parent 48363a90ef
commit f1d7357e75
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -55,7 +55,7 @@ export function getApId(value: string | Object): string {
export function getOneApId(value: ApObject): string {
if (Array.isArray(value)) {
// find the first valid ID
for (const id of value) {
for (const x of value) {
try {
return getApId(x);
} catch {