diff --git a/src/ribbit.ts b/src/ribbit.ts index 981ad71..0c76fac 100644 --- a/src/ribbit.ts +++ b/src/ribbit.ts @@ -77,10 +77,11 @@ const tagBlock = async (tagName: string, props = {}, fn: Function) => { } const tagCall = (tagName: string, atNamed = {}, ...args: any[]) => { - console.log('tagCall:', { tagName, atNamed, args }) args = args.map(arg => typeof arg === 'function' ? arg.tagName : arg) - const attrs = Object.entries(atNamed).map(([key, value]) => `${key}="${typeof value === 'function' ? (value as any).tagName : value}"`) + const attrs = Object.entries(atNamed) + .filter(([key, value]) => value) + .map(([key, value]) => `${key}="${typeof value === 'function' ? (value as any).tagName : value}"`) const space = attrs.length ? ' ' : '' const children = args .reverse()