1
0
Fork 0
mirror of synced 2024-08-18 19:41:30 +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 ee6a5bffd5
commit ea34856896

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]