Skip to content

Allow empty object first for RBE - #6000

Merged
knolleary merged 2 commits into
node-red:mainfrom
hardillb:rbe-allow-empty-object-first
Oct 14, 2026
Merged

knolleary merged 2 commits into
node-red:mainfrom
hardillb:rbe-allow-empty-object-first

Conversation

@hardillb

Copy link
Copy Markdown
Member

fixes #5997

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

Needs checking for regressions.

__empty "should" be a unique enough object key to not be realisically a clash in the real world....

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run npm run test to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

fixes node-red#5997

Needs checking for regressions.

`__empty` "should" be a unique enough object key to not be realisically
a clash in the real world....
@hardillb hardillb self-assigned this Oct 12, 2026
@dceejay

dceejay commented Oct 12, 2026

Copy link
Copy Markdown
Member

Looks good. Yet another that is potentially breaking is an obscure corner of the universe... But yes.

@m-schaeffler m-schaeffler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not implement something like this

                    if (typeof(value) === "object") {
                        if (typeof(node.previous[t]) !== "object" || !RED.util.compareObjects(value, node.previous[t])) {
                            node.previous[t] = RED.util.cloneMessage(value);
                            if (doSend) { node.send(msg); }
                        }
                    }

@knolleary
knolleary merged commit 1eedb5e into node-red:main Oct 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RBE node: empty object is blocked

4 participants