diff --git a/process/Loghistory_lib/process.js b/process/Loghistory_lib/process.js index 57832021be702f364f574831b37f6600a1cb3db0..15f076f82fd94d2cd1fb67f8a186b0fb4f7a80de 100644 --- a/process/Loghistory_lib/process.js +++ b/process/Loghistory_lib/process.js @@ -186,17 +186,17 @@ LogHistoryExecutor.prototype.execute = function () { //TODO: CLOB-check should be done by viewing the structure column type //use .trim() for "[CLOB]" check because in some case the value "[CLOB]\n" my be given - if (this.oldValues[i].trim() == "[CLOB]" || this.oldValues[i] == "") + if (this.oldValues[i] != null && (this.oldValues[i].trim() == "[CLOB]" || this.oldValues[i].trim() == "")) description.push(translate.withArguments("%0 \"%1\"", [logfieldTitle + ":", this.newValues[i]], this.translationLanguage)); else description.push(translate.withArguments("%0 from \"%1\" to \"%2\"", [logfieldTitle + ":", this.oldValues[i], this.newValues[i]], this.translationLanguage)); } //use .trim() for "[CLOB]" check because in some case the value "[CLOB]\n" my be given - if (this.sqlAction == 'I' && this.newValues[i] != "" && this.newValues[i].trim() != "[CLOB]") + if (this.sqlAction == 'I' && this.newValues[i] != "" && this.newValues[i] != null && this.newValues[i].trim() != "[CLOB]") description.push(logfieldTitle + ": \"" + this.newValues[i] + "\""); //use .trim() for "[CLOB]" check because in some case the value "[CLOB]\n" my be given - if (this.sqlAction == 'D' && this.oldValues[i] != "" && this.oldValues[i].trim() != "[CLOB]") + if (this.sqlAction == 'D' && this.oldValues[i] != "" && this.oldValues[i] != null && this.oldValues[i].trim() != "[CLOB]") description.push(logfieldTitle + ": \"" + this.oldValues[i] + "\""); } }