fix checkUniqueBetweenRows函数中拼接字符bug
This commit is contained in:
parent
73ec876aeb
commit
8b0faedcaf
|
|
@ -16,10 +16,10 @@ function checkUniqueBetweenRows(rows, uniqAttrs) {
|
||||||
let s = '';
|
let s = '';
|
||||||
for (const a of uniqAttrs) {
|
for (const a of uniqAttrs) {
|
||||||
if (row[a] === null || row[a] === undefined) {
|
if (row[a] === null || row[a] === undefined) {
|
||||||
s + row.id;
|
s += row.id;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s + `-${row[a]}`;
|
s += `-${row[a]}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dict[s]) {
|
if (dict[s]) {
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@ function checkUniqueBetweenRows(rows: Record<string, any>[], uniqAttrs: string[]
|
||||||
let s = '';
|
let s = '';
|
||||||
for (const a of uniqAttrs) {
|
for (const a of uniqAttrs) {
|
||||||
if (row[a] === null || row[a] === undefined) {
|
if (row[a] === null || row[a] === undefined) {
|
||||||
s + row.id;
|
s += row.id;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s + `-${row[a]}`;
|
s += `-${row[a]}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dict[s]) {
|
if (dict[s]) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue