Skip to content

Commit 8a841d2

Browse files
fintarachristianalfoni
authored andcommitted
fix(overmind): fix parallel operator in production
1 parent 8c4675e commit 8a841d2

File tree

1 file changed

+5
-5
lines changed
  • packages/node_modules/overmind/src

1 file changed

+5
-5
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ export function forEach<
863863
lastContext = createContext(
864864
lastContext || context,
865865
value,
866-
context.execution.path.concat(String(index))
866+
context.execution.path && context.execution.path.concat(String(index))
867867
)
868868
const nextWithPath = createNextPath(evaluate)
869869
forEachItemOperator(null, lastContext, nextWithPath)
@@ -905,7 +905,7 @@ export function parallel<Input, ThisConfig extends Configuration = Config>(
905905
lastContext = createContext(
906906
lastContext || context,
907907
context.value,
908-
context.execution.path.concat(String(index))
908+
context.execution.path && context.execution.path.concat(String(index))
909909
)
910910
const nextWithPath = createNextPath(evaluate)
911911
operator(null, lastContext, nextWithPath)
@@ -1010,7 +1010,7 @@ export function fork<
10101010
const newContext = createContext(
10111011
context,
10121012
context.value,
1013-
context.execution.path.concat(path)
1013+
context.execution.path && context.execution.path.concat(path)
10141014
)
10151015
const nextWithPaths = createNextPath((err, returnedContext) => {
10161016
if (err) next(err)
@@ -1046,7 +1046,7 @@ export function when<
10461046
const newContext = createContext(
10471047
context,
10481048
context.value,
1049-
context.execution.path.concat('true')
1049+
context.execution.path && context.execution.path.concat('true')
10501050
)
10511051
if (operation(context)) {
10521052
const nextWithPath = createNextPath(next)
@@ -1056,7 +1056,7 @@ export function when<
10561056
const newContext = createContext(
10571057
context,
10581058
context.value,
1059-
context.execution.path.concat('false')
1059+
context.execution.path && context.execution.path.concat('false')
10601060
)
10611061
const nextWithPath = createNextPath(next)
10621062
stopDebugOperator(context, context.value)

0 commit comments

Comments
 (0)