fix: robot edit type errors
This commit is contained in:
@@ -383,15 +383,18 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => {
|
|||||||
if (!prev) return prev;
|
if (!prev) return prev;
|
||||||
|
|
||||||
const updatedWorkflow = [...prev.recording.workflow];
|
const updatedWorkflow = [...prev.recording.workflow];
|
||||||
|
const pair = updatedWorkflow[pairIndex];
|
||||||
|
const action = pair?.what?.[actionIndex];
|
||||||
if (
|
if (
|
||||||
updatedWorkflow.length > pairIndex &&
|
updatedWorkflow.length > pairIndex &&
|
||||||
updatedWorkflow[pairIndex]?.what &&
|
pair?.what &&
|
||||||
updatedWorkflow[pairIndex].what.length > actionIndex &&
|
pair.what.length > actionIndex &&
|
||||||
updatedWorkflow[pairIndex].what[actionIndex].args &&
|
action?.args &&
|
||||||
updatedWorkflow[pairIndex].what[actionIndex].args.length > argIndex
|
action.args.length > argIndex
|
||||||
) {
|
) {
|
||||||
updatedWorkflow[pairIndex].what[actionIndex].args[argIndex].limit =
|
if (action.args[argIndex]) {
|
||||||
newLimit;
|
action.args[argIndex].limit = newLimit;
|
||||||
|
}
|
||||||
|
|
||||||
setScrapeListLimits((prev) => {
|
setScrapeListLimits((prev) => {
|
||||||
return prev.map((item) => {
|
return prev.map((item) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user