Skip to content

Commit

Permalink
remove onData from inputName - handled elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Knar33 committed Nov 2, 2023
1 parent 871e278 commit 0046a5a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/core/shared/src/nodes/io/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ export class InputComponent extends MagickComponent<InputReturn> {
name: 'Input Name',
icon: 'moon',
defaultValue: 'Default',
onData: data => {
node.data.name = `Input - ${data}`
},
tooltip: 'Tooltip text for Input Name',
}

Expand Down Expand Up @@ -261,13 +258,15 @@ export class InputComponent extends MagickComponent<InputReturn> {
if (node?._task) node._task.closed = []

let output = data[node.data.name]
if (output === undefined && node.data.name === "Input - Default") {
if (output === undefined && node.data.name === 'Input - Default') {
output = Object.values(data)[0]
}

if (!output) {
this.logger.error('No input recieved in input node for ' + node.data.name)
throw new Error("No input recieved")
this.logger.error(
'No input recieved in input node for ' + node.data.name
)
throw new Error('No input recieved')
}

return {
Expand Down

0 comments on commit 0046a5a

Please sign in to comment.