Skip to content

Commit

Permalink
πŸ› Use typeof checked instead of == to make the linter happy (#228)
Browse files Browse the repository at this point in the history
Co-authored-by: Rowan Cockett <[email protected]>
  • Loading branch information
batpad and rowanc1 authored Mar 28, 2024
1 parent 2b288cd commit 57b7037
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/listItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ export function ListItem({
line?: number;
children?: any[];
}): JSX.Element {
if (checked == null) {
if (typeof checked === 'boolean') {
return (
<li>
<TaskItem checked={checked} line={line}>
<MyST ast={children} />
</li>
</TaskItem>
);
}
return (
<TaskItem checked={checked} line={line}>
<li>
<MyST ast={children} />
</TaskItem>
</li>
);
}

0 comments on commit 57b7037

Please sign in to comment.