fix checkUniqueBetweenRows函数中拼接字符bug

This commit is contained in:
wkj 2024-05-13 12:33:11 +08:00
parent 73ec876aeb
commit 8b0faedcaf
2 changed files with 4 additions and 4 deletions

View File

@ -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]) {

View File

@ -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]) {