fix le shit
This commit is contained in:
1 parent
231392a428
commit
c78941a39a
3 files changed
+10
-4
No files matched your search
@@ -59,8 +59,13 @@ function recordMatchesIdentifier(record, identifier, mediaType) {
|
||||
|
||||
function getAniListIds(records, identifier, mediaType) {
|
||||
const ids = [];
|
||||
const normalizedRecords = Array.isArray(records)
|
||||
? records
|
||||
: records && typeof records === 'object'
|
||||
? [records]
|
||||
: [];
|
||||
|
||||
for (const record of Array.isArray(records) ? records : []) {
|
||||
for (const record of normalizedRecords) {
|
||||
if (!recordMatchesIdentifier(record, identifier, mediaType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user