Skip to content

Commit

Permalink
fix(lib): check inputs in compute, reuse storage
Browse files Browse the repository at this point in the history
  • Loading branch information
narekhovhannisyan committed Feb 21, 2024
1 parent 89713fb commit 62fbf33
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/lib/compute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ const mergePluginParams = (
inputs: PluginParams[],
defaults: PluginParams[] | undefined
) =>
inputs.map(input => ({
...input,
...defaults,
}));
inputs
? inputs.map(input => ({
...input,
...defaults,
}))
: [];

/**
* 1. If the node has it's own pipeline, defaults or config then use that,
Expand Down Expand Up @@ -61,7 +63,8 @@ const computeNode = async (node: Node, params: Params): Promise<any> => {
const nodeConfig = config && config[pluginName];

if (metadata.kind === 'execute') {
node.outputs = await execute(storage, nodeConfig);
storage = await execute(storage, nodeConfig);
node.outputs = storage;
}

if (metadata.kind === 'groupby') {
Expand Down

0 comments on commit 62fbf33

Please sign in to comment.