Skip to content

Commit

Permalink
nit: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn committed Jul 18, 2024
1 parent 9501a3b commit 76f4f90
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/utils/parseIntents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function parseIntent(
): JSXNode | JSXNode[] {
// Check if the node is a "falsy" node (ie. `null`, `undefined`, `false`, etc).
const node = (
!node_ ? { children: [], props: {}, tag() { } } : node_
!node_ ? { children: [], props: {}, tag() {} } : node_
) as JSXNode

const props = (() => {
Expand All @@ -55,13 +55,13 @@ function parseIntent(
? node.props.action.startsWith('http')
? node.props.action
: parsePath(
node.props.action.startsWith('~')
? options.initialBaseUrl + node.props.action.slice(1)
: options.baseUrl + node.props.action,
) +
(options.search && !value?.startsWith(buttonPrefix.addCastAction)
? `?${options.search}`
: '')
node.props.action.startsWith('~')
? options.initialBaseUrl + node.props.action.slice(1)
: options.baseUrl + node.props.action,
) +
(options.search && !value?.startsWith(buttonPrefix.addCastAction)
? `?${options.search}`
: '')
: undefined,
children: node.children,
index: counter.button++,
Expand All @@ -76,7 +76,7 @@ function parseIntent(
buttonProps.target = node.props.target?.startsWith('http')
? node.props.target
: parsePath(options.baseUrl + node.props.target) +
(search ? `?${search}` : '')
(search ? `?${search}` : '')
}

return buttonProps
Expand Down

0 comments on commit 76f4f90

Please sign in to comment.