1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
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
2020-02-25 23:06:14 +00:00
2017-06-23 21:49:35 +01:00
2018-09-28 16:21:49 +01:00
2019-02-28 22:21:22 +00:00
2020-02-27 11:38:44 +00:00
2016-04-07 21:51:12 +01:00
2019-08-06 19:27:46 +09:00
2019-01-28 14:40:42 +00:00
2020-02-27 14:37:25 +00:00
2019-09-30 13:38:46 +01:00
2019-09-10 12:56:32 +01:00

Node-RED

http://nodered.org

Build Status Coverage Status

Low-code programming for event-driven applications.

Node-RED: Low-code programming for event-driven applications

Quick Start

Check out http://nodered.org/docs/getting-started/ for full instructions on getting started.

  1. sudo npm install -g --unsafe-perm node-red
  2. node-red
  3. Open http://localhost:1880

Getting Help

More documentation can be found here.

For further help, or general discussion, please use the Node-RED Forum or slack team.

Developers

If you want to run the latest code from git, here's how to get started:

  1. Clone the code:

     git clone https://github.com/node-red/node-red.git
     cd node-red
    
  2. Install the node-red dependencies

     npm install
    
  3. Build the code

     npm run build
    
  4. Run

     npm start
    

Contributing

Before raising a pull-request, please read our contributing guide.

This project adheres to the Contributor Covenant 1.4. By participating, you are expected to uphold this code. Please report unacceptable behavior to any of the project's core team at team@nodered.org.

Authors

Node-RED is a project of the OpenJS Foundation.

It was created by IBM Emerging Technology.

Copyright JS Foundation and other contributors, https://openjsf.org under the Apache 2.0 license.

Description
No description provided
Readme
Languages
JavaScript 99.7%
HTML 0.3%