Updates
This commit is contained in:
@@ -23,7 +23,7 @@ function grabParsedValue({ value, tableSchema, encryptionKey, encryptionSalt, da
|
||||
if (typeof newValue == "undefined")
|
||||
return;
|
||||
if (typeof newValue == "object" && !newValue)
|
||||
newValue = "";
|
||||
newValue = null;
|
||||
const htmlRegex = /<[^>]+>/g;
|
||||
if ((targetFieldSchema === null || targetFieldSchema === void 0 ? void 0 : targetFieldSchema.richText) || String(newValue).match(htmlRegex)) {
|
||||
newValue = (0, sanitize_html_1.default)(newValue, sanitizeHtmlOptions_1.default);
|
||||
@@ -50,19 +50,9 @@ function grabParsedValue({ value, tableSchema, encryptionKey, encryptionSalt, da
|
||||
newValue = "";
|
||||
}
|
||||
}
|
||||
if (typeof newValue === "string" && newValue.match(/^null$/i)) {
|
||||
newValue = {
|
||||
toSqlString: function () {
|
||||
return "NULL";
|
||||
},
|
||||
};
|
||||
}
|
||||
if (typeof newValue === "string" && !newValue.match(/./i)) {
|
||||
newValue = {
|
||||
toSqlString: function () {
|
||||
return "NULL";
|
||||
},
|
||||
};
|
||||
if (typeof newValue === "string" &&
|
||||
(newValue.match(/^null$/i) || !newValue.match(/./i))) {
|
||||
newValue = null;
|
||||
}
|
||||
return newValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user