Update packages/node_modules/@node-red/editor-client/src/js/nodes.js

Co-authored-by: Gauthier Dandele <92022724+GogoVega@users.noreply.github.com>
This commit is contained in:
Nick O'Leary 2024-12-04 09:55:09 +00:00 committed by GitHub
parent 4e6c8ea367
commit 338ddf17de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2722,14 +2722,14 @@ RED.nodes = (function() {
* Update any config nodes referenced by the provided node to ensure * Update any config nodes referenced by the provided node to ensure
* their 'users' list is correct. * their 'users' list is correct.
* *
* Options:
* - `action` - Add or remove the node from the Config Node users list. Default `add`.
* - `emitEvent` - Emit the `nodes:changes` event. Default true.
*
* @param {object} node The node in which to check if it contains references * @param {object} node The node in which to check if it contains references
* @param {{ action?: "add" | "remove"; emitEvent?: boolean; }} options Options to apply. * @param {object} options Options to apply.
* @param {"add" | "remove"} [options.action] Add or remove the node from
* the Config Node users list. Default `add`.
* @param {boolean} [options.emitEvent] Emit the `nodes:changes` event.
* Default true.
*/ */
function updateConfigNodeUsers(node, options = {}) { function updateConfigNodeUsers(node, options) {
const defaultOptions = { action: "add", emitEvent: true }; const defaultOptions = { action: "add", emitEvent: true };
options = Object.assign({}, defaultOptions, options); options = Object.assign({}, defaultOptions, options);