@saltcorn/history-control 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.js +2 -1
- package/diffview.js +1 -1
- package/package.json +1 -1
package/common.js
CHANGED
|
@@ -68,6 +68,7 @@ const updateRow = async (table_name, update_in, version_id) => {
|
|
|
68
68
|
const sqlParts = [],
|
|
69
69
|
values = [];
|
|
70
70
|
const nkeys = Object.keys(update).length;
|
|
71
|
+
if (nkeys === 0) return;
|
|
71
72
|
const [version, id] = version_id.split("_");
|
|
72
73
|
Object.entries(update).forEach(([k, v], ix) => {
|
|
73
74
|
sqlParts.push(`"${db.sqlsanitize(k)}"=$${ix + 1}`);
|
|
@@ -117,7 +118,7 @@ const countRows = async (table_name, whereFull) => {
|
|
|
117
118
|
table_name
|
|
118
119
|
)}__history" h ${where.length ? ` ${where}` : ""}`;
|
|
119
120
|
const { rows } = await db.query(sql, values);
|
|
120
|
-
console.log(rows);
|
|
121
|
+
//console.log(rows);
|
|
121
122
|
return +rows?.[0]?.count;
|
|
122
123
|
};
|
|
123
124
|
|
package/diffview.js
CHANGED
|
@@ -125,7 +125,7 @@ const run = async (
|
|
|
125
125
|
const oldH = cmpMode === "Latest" ? row[diff_field] : cmpTo[diff_field];
|
|
126
126
|
const newH = cmpMode === "Latest" ? cmpTo[diff_field] : row[diff_field];
|
|
127
127
|
diff_html = HtmlDiff.default.execute(oldH, newH);
|
|
128
|
-
console.log({ oldH, newH, diff_html });
|
|
128
|
+
//console.log({ oldH, newH, diff_html });
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|