Skip to content

Commit 6c477ed

Browse files
authored
added fix for getTokenData (#23)
1 parent 745ac85 commit 6c477ed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/util/components/projects/projectId/labeling/labeling-helper.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,12 @@ export function getTokenData(attributeId: string, attributes: Attribute[], recor
159159
if (!attributes) return null;
160160
if (attributeId == FULL_RECORD_ID) return null;
161161
if (!recordRequests.token) return null;
162-
for (const att of recordRequests.token.attributes) {
163-
if (att.attributeId == attributeId) return att;
162+
try {
163+
for (const att of recordRequests.token.attributes) {
164+
if (att.attributeId == attributeId) return att;
165+
}
166+
} catch (e) {
167+
return null;
164168
}
165169
return null;
166170
}

0 commit comments

Comments
 (0)