1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/packages/node_modules/@node-red/runtime
Nick O'Leary 84771f5864
Flows/subflows must preinitialise their context objects
Fixes #2513

If a node inside a subflow accessed its context object in its
constructor, the subflow-instance flow context would not yet
have been created. This would cause a place holder context
to get created on its behalf, but that place holder doesn't
have its parent set properly. This then breaks the usage
of $parent inside such a subflow.

This fix has changed it so flows (and subflows) create their
flow context as part of their initial creation. That ensures
it exists when individual nodes from the subflow are created,
allowing them to safely access their context.

This has also fixed a related issue where any attempt to use
$parent to access beyond the root parent would seemingly hang
as the callback was never being called. This would cause
messages to get stuck in flows. The fix ensures the callback
is used in the root context objects and undefined is returned.
2020-03-27 23:47:12 +00:00
..
lib Flows/subflows must preinitialise their context objects 2020-03-27 23:47:12 +00:00
locales complete traditional chinese translation 2020-02-10 11:31:37 +09:00
.npmignore Add pack-modules grunt task 2018-10-25 11:18:13 +01:00
LICENSE Add LICENSE to each package 2018-08-21 13:57:59 +01:00
package.json Bump for 1.0.4 2020-02-27 14:37:25 +00:00
README.md Add README files to each package 2018-08-21 13:43:11 +01:00

@node-red/runtime

Node-RED runtime module.

This provides the core flow engine of Node-RED. It is the main entry point for the runtime.

Source

The main Node-RED modules are maintained as a monorepo on GitHub.