Check for string type before decode
This commit is contained in:
parent
5fc8299390
commit
5941b3d64b
|
@ -283,7 +283,7 @@ module External {
|
||||||
// one to many
|
// one to many
|
||||||
if (isOneSide(field)) {
|
if (isOneSide(field)) {
|
||||||
let id = row[key][0]
|
let id = row[key][0]
|
||||||
if (isNaN(id)) {
|
if (typeof row[key] === "string") {
|
||||||
id = decodeURIComponent(row[key]).match(/\[(.*?)\]/)?.[1]
|
id = decodeURIComponent(row[key]).match(/\[(.*?)\]/)?.[1]
|
||||||
}
|
}
|
||||||
newRow[field.foreignKey || linkTablePrimary] = breakRowIdField(id)[0]
|
newRow[field.foreignKey || linkTablePrimary] = breakRowIdField(id)[0]
|
||||||
|
|
Loading…
Reference in New Issue