Open riskygit opened 10 months ago
<tail-cta webc:if="tail_cta" :@lead="tail_cta?.lead" :@logos="tail_cta?.logos" :@href="tail_cta?.href ?? '/get-started/'" :@button-text="tail_cta?.button_text ?? 'Book a call'" ></tail-cta>
If I remove any of the ?.s, this happens regardless of whether the value is undefined:
?.
[11ty] Problem writing Eleventy templates: (more in DEBUG output) [11ty] 1. Having trouble writing to "dist/index.html" from "./src/index.webc" (via EleventyTemplateError) [11ty] 2. Evaluating a dynamic prop failed: `:@button-text="tail_cta.button_text ?? 'Book a call'"`. [11ty] Original error message: Cannot read properties of undefined (reading 'button_text') (via Error) [11ty] [11ty] Original error stack trace: Error: Evaluating a dynamic prop failed: `:@button-text="tail_cta.button_text ?? 'Book a call'"`. [11ty] Original error message: Cannot read properties of undefined (reading 'button_text')
Doesn't make sense to me.
If I remove any of the
?.
s, this happens regardless of whether the value is undefined:Doesn't make sense to me.