Skip to content

fix: fix some issues when activating template check#1225

Open
Isokaeder wants to merge 1 commit intomasterfrom
fix-some-template-type-issues
Open

fix: fix some issues when activating template check#1225
Isokaeder wants to merge 1 commit intomasterfrom
fix-some-template-type-issues

Conversation

@Isokaeder
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions bot added the package:kotti-ui @3yourmind/kotti-ui label Mar 15, 2026
:minutes="Array.isArray(minutes) ? minutes[0] : minutes"
:seconds="Array.isArray(seconds) ? seconds[0] : seconds"
:hours="
Array.isArray(hours) ? (hours as [number, number])[0] : hours
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this could be a utility:

const getTimeValue = (value: number | [number, number]): number => Array.isArray(value) ? (value as [number, number])[0] : value

Suggested change
Array.isArray(hours) ? (hours as [number, number])[0] : hours
getTimeValue(hours)

Copy link
Copy Markdown
Collaborator

@santiagoballadares santiagoballadares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:kotti-ui @3yourmind/kotti-ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants