You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took the example from the documentation for embedding (simple graph that just repeats in to core/Display).
`"use strict";
// Load the NoFlo module
const noflo = require('noflo')
// Use NoFlo's asCallback helper to prepare a JS function that wraps the graph
const wrappedGraph = noflo.asCallback('show_flow', {
// Provide the project base directory where NoFlo seeks graphs and components
baseDir: process.cwd()
})
// Call the wrapped graph. Can be done multiple times
wrappedGraph({
// Provide data to be sent to inports
in: 'foo',
}, (err, result) => {
// If component sent to its error port, then we'll have err
if (err) { throw err }
// Do something with the results
//console.log(result.out)
})`
I added a console.log to component/Graph.js just before the graph loadFile call.
When using asCallback I noticed that two graph instances are being instantiated for each graph component.
The text was updated successfully, but these errors were encountered: