1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-30 22:43:57 +02:00

fix: missing case

This commit is contained in:
Acid Chicken (硫酸鶏)
2023-04-01 17:54:30 +09:00
parent f39b5be064
commit 4521e61ae2

View File

@@ -75,7 +75,7 @@ function h<T extends estree.Node>(
props: Omit<T, 'type'> props: Omit<T, 'type'>
): T { ): T {
const type = component.replace(/(?:^|-)([a-z])/g, (_, c) => c.toUpperCase()); const type = component.replace(/(?:^|-)([a-z])/g, (_, c) => c.toUpperCase());
return Object.assign(props, { type }) as T; return Object.assign(props || {}, { type }) as T;
} }
declare global { declare global {