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:
@@ -104,7 +104,7 @@ var api = module.exports = {
|
||||
}
|
||||
}
|
||||
safeSettings.libraries = runtime.library.getLibraries();
|
||||
if (util.isArray(runtime.settings.paletteCategories)) {
|
||||
if (Array.isArray(runtime.settings.paletteCategories)) {
|
||||
safeSettings.paletteCategories = runtime.settings.paletteCategories;
|
||||
}
|
||||
|
||||
|
@@ -377,7 +377,7 @@ Node.prototype.send = function(msg) {
|
||||
|
||||
if (msg === null || typeof msg === "undefined") {
|
||||
return;
|
||||
} else if (!util.isArray(msg)) {
|
||||
} else if (!Array.isArray(msg)) {
|
||||
// A single message has been passed in
|
||||
if (typeof msg !== 'object') {
|
||||
this.error(Log._("nodes.flow.non-message-returned", { type: typeof msg }));
|
||||
@@ -425,7 +425,7 @@ Node.prototype.send = function(msg) {
|
||||
if (i < msg.length) {
|
||||
var msgs = msg[i]; // msgs going to output i
|
||||
if (msgs !== null && typeof msgs !== "undefined") {
|
||||
if (!util.isArray(msgs)) {
|
||||
if (!Array.isArray(msgs)) {
|
||||
msgs = [msgs];
|
||||
}
|
||||
var k = 0;
|
||||
|
Reference in New Issue
Block a user