Skip to content

Commit

Permalink
Avoid ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoppolo committed Oct 13, 2022
1 parent c8a706e commit a28a0ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/classes/IntervalClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,7 @@ export default class IntervalClient {
if (typeof value === 'function' || value instanceof Promise) {
items.push({ label })
} else {
items.push(
error ? { label, value, error } : { label, value }
)
items.push({ label, value, error })
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/classes/Layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface MetaItem {
export const META_ITEM_SCHEMA = z.object({
label: z.string(),
value: primitiveValue.or(z.bigint()).nullish(),
error: z.string().optional(),
error: z.string().nullish(),
})

export type MetaItemSchema = z.infer<typeof META_ITEM_SCHEMA>
Expand Down

0 comments on commit a28a0ee

Please sign in to comment.