Skip to content

Commit

Permalink
fix: bug where domain was null in handle open action url
Browse files Browse the repository at this point in the history
  • Loading branch information
mguellsegarra committed Jan 23, 2025
1 parent e341886 commit 4fd7e0b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/views/RootView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,16 @@ function RootView(props: RootViewProps, ref: any) {
actionRawData.context !== null
) {
parsedContext = actionRawData;
} else {
} else if (actionRawData && actionRawData.context) {
parsedContext =
actionRawData &&
parseContext({
context: actionRawData.context,
fields: actionRawData.fields || {},
values: { ...globalValues, ...(actionRawData.values || {}) },
});
} else {
parsedContext = {};
}

const parsedDomain = await (async () => {
Expand All @@ -102,7 +104,11 @@ function RootView(props: RootViewProps, ref: any) {
actionRawData.domain.length > 0
) {
return actionRawData.domain;
} else if (actionRawData && !Array.isArray(actionRawData.domain)) {
} else if (
actionRawData &&
actionRawData.domain &&
!Array.isArray(actionRawData.domain)
) {
return await ConnectionProvider.getHandler().evalDomain({
domain: actionRawData.domain,
values: actionRawData.fields
Expand Down

0 comments on commit 4fd7e0b

Please sign in to comment.