Fix debug message format for Buffer (#1444)

and add a test case
This commit is contained in:
Hiroki Uchikawa
2017-10-23 19:13:28 +09:00
committed by Nick O'Leary
parent dba6ff1d51
commit 22772ca33e
2 changed files with 29 additions and 1 deletions

View File

@@ -138,7 +138,7 @@ module.exports = function(RED) {
value = value.substring(0,debuglength)+"...";
}
} else if (value && value.constructor) {
if (value.constructor.name === "Buffer") {
if (value.type === "Buffer") {
value.__encoded__ = true;
value.length = value.data.length;
if (value.length > debuglength) {