Getting undefined when using <raw> or @{{
See original GitHub issueI’m trying to not escape my vars in {{}} but they keep turning into undefined
. I wrapped it in <raw>
which didn’t fix it, I also added @{{ but that didn’t work for the href’s.
Unsure what I’m doing wrong.
- Maizzle Version: 1.0.7
- Node.js Version: 13.0.1
Template:
---
title: You have been invited
bodyClass: bg-white h-full font-sans p-4 text-gray-900
htmlClass: bg-white h-full font-sans p-4 text-gray-900
---
<extends src="src/layouts/master.html">
<block name="template">
<raw>
<div>
<h1 class="mb-4 text-2xl font-bold leading-tight text-black">
{{ givenName }} invited you to {{ storyName }}
</h1>
<p class="mb-12 text-base font-medium leading-tight">
{{ fullName }} has invited you to edit
<a href="@{{inviteLink}}" class="underline text-tella"
>{{ storyName }}</a
>
on X.
</p>
<a
href="{{ inviteLink }}"
class="inline-flex items-center px-6 py-3 text-lg font-medium text-white no-underline border border-transparent rounded h-9 transition ease-in-out duration-150 focus:outline-none hover:shadow bg-tella focus:border-tella focus:shadow-outline-purple active:text-gray-400"
>Open in X</a
>
<component src="src/components/footer.html"></component>
</div>
</raw>
</block>
</extends>
Generated:
<div>
--
| <h1 class="mb-4 text-2xl font-bold leading-tight text-black">
| undefined invited you to undefined
| </h1>
| <p class="mb-12 text-base font-medium leading-tight">
| undefined has invited you to edit
| <a href="@undefined" class="underline text-tella">undefined</a>
| on Tella.
| </p>
| <a href="undefined" class="inline-flex items-center px-6 py-3 text-lg font-medium text-white no-underline border border-transparent rounded h-9 transition ease-in-out duration-150 focus:outline-none hover:shadow bg-tella focus:border-tella focus:shadow-outline-purple active:text-gray-400">Open in Tella</a>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
ERROR :- Undefined variable: raw While Transfering data ...
You can simply solve this issue by using the isset() function to avoid undefined variable issue. Try below:
Read more >Getting "undefined variable 'raw' " message : r/NixOS - Reddit
Getting "undefined variable 'raw' " message. So I am basically getting this error while trying to rebuild my nixos setup, I am just...
Read more >Cannot Read Property of Undefined in JavaScript - Rollbar
Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong...
Read more >String.raw() - JavaScript - MDN Web Docs
It's used to get the raw string form of template literals — that is, ... have a raw property, or the raw property...
Read more >How to check for undefined in JavaScript
If you compared an undeclared variable to undefined or void(0) you would instead get a ReferenceError. But don't use void(0) directly. Avoid ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome! Thanks for the fast response. Also, Maizzle is great!
Fixed in v1.0.9