mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
chore: migrate deprecated util.isArray
Deprecated: Use Array.isArray() instead. Source: https://nodejs.org/docs/latest-v18.x/api/util.html#utilisarrayobject
This commit is contained in:
@@ -862,7 +862,7 @@ function encodeObject(msg,opts) {
|
||||
message: msg.msg.message
|
||||
});
|
||||
} else {
|
||||
var isArray = util.isArray(msg.msg);
|
||||
var isArray = Array.isArray(msg.msg);
|
||||
var needsStringify = isArray;
|
||||
if (isArray) {
|
||||
msg.format = "array["+msg.msg.length+"]";
|
||||
@@ -906,7 +906,7 @@ function encodeObject(msg,opts) {
|
||||
}
|
||||
} else if (value instanceof Error) {
|
||||
value = value.toString()
|
||||
} else if (util.isArray(value) && value.length > debuglength) {
|
||||
} else if (Array.isArray(value) && value.length > debuglength) {
|
||||
value = {
|
||||
__enc__: true,
|
||||
type: "array",
|
||||
|
Reference in New Issue
Block a user