From 48f85f5b435601032cf96fcc1fcb88b0d2a7d111 Mon Sep 17 00:00:00 2001 From: Ryohei Nagao Date: Mon, 6 Jun 2022 20:23:35 +0900 Subject: [PATCH] apply parseInt to count(string) --- utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities.js b/utilities.js index 9a836b1..1429626 100644 --- a/utilities.js +++ b/utilities.js @@ -397,7 +397,7 @@ const upgrade = connection => { this.escape(row[uniqueKey]), [], (err, count) => { - if (count === 1) this.update(table, row, callback); + if (parseInt(count, 10) === 1) this.update(table, row, callback); else this.insert(table, row, callback); } );