1
0
Fork 0
mirror of synced 2024-06-22 16:10:40 +12:00

Check for string type before decode

This commit is contained in:
Mel O'Hagan 2022-10-27 17:55:46 +01:00
parent 5fc8299390
commit 5941b3d64b

View file

@ -283,7 +283,7 @@ module External {
// one to many
if (isOneSide(field)) {
let id = row[key][0]
if (isNaN(id)) {
if (typeof row[key] === "string") {
id = decodeURIComponent(row[key]).match(/\[(.*?)\]/)?.[1]
}
newRow[field.foreignKey || linkTablePrimary] = breakRowIdField(id)[0]