Skip to content

Commit

Permalink
let omniflow accept existing initial omni params
Browse files Browse the repository at this point in the history
  • Loading branch information
XiNiHa committed Nov 16, 2024
1 parent db1b1ce commit eeafd8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eleven-ants-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@contentstech/stackflow-plugin-omniflow": patch
---

Don't override omniflow params when initializing if there's already one
5 changes: 4 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ export function omniflow<ActivityName extends string>({
const initialParams = getOmniInitialParams(
topActivityEvent.activityName as ActivityName,
);
if (initialParams) {
if (
initialParams &&
topActivityEvent.activityParams.OMNI_childName == null
) {
topActivityEvent.activityParams = {
OMNI_childName: JSON.stringify(initialParams.childName),
OMNI_childParams: JSON.stringify(initialParams.childParams),
Expand Down

0 comments on commit eeafd8f

Please sign in to comment.