Skip to content

Commit 29f4eaa

Browse files
committed
Fix lint
1 parent b416530 commit 29f4eaa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/pages/errors/[error_code].tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,9 @@ export const getStaticProps: GetStaticProps<ErrorDecoderProps> = async ({
188188
return (tree) => {
189189
visit(tree, 'element', (node) => {
190190
if (
191-
'tagName' in node &&
192-
typeof node.tagName === 'string' &&
191+
// @ts-expect-error -- tagName is a valid property
193192
node.tagName === 'code' &&
194-
node.data &&
195-
node.data.meta
193+
node.data?.meta
196194
) {
197195
// @ts-expect-error -- properties is a valid property
198196
node.properties.meta = node.data.meta;

0 commit comments

Comments
 (0)