Empty nested variables breaking templates when used inside components
See original GitHub issue- Maizzle Version: 4.0.0
- Node.js Version: 16.5.3
Hi,
It’d be really handy if we were able to build templates locally that include nested variables e.g. page.myVariable.myNestedVariable
. Currently we’re having to insert these into our maizzle config when developing locally, e.g:
const config = {
...
myVariable: {
}
}
If maizzle serve
used lodash/get
(or similar) for getting template variables that would save us a lot of hassle. Alternatively, if maizzle serve
supported optional chaining that would also help, but even on new versions of node optional chaining doesn’t seem to do anything, the templates still break.
Thanks!
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Nested Templates Maintain Lexical Binding In Angular 7.2.13
Templates in Angular work like lexically-bound HTML fragments. This allows them to access variables declared in a parent scope as well as ...
Read more >Template literals (Template strings) - JavaScript | MDN
Nesting templates In certain cases, nesting a template is the easiest (and perhaps more readable) way to have configurable strings. Within a ...
Read more >Template::Manual::Variables
When the variable is used, the Template Toolkit will automatically call the subroutine, passing any additional arguments specified. The return ...
Read more >Helm optional nested variables - kubernetes - Stack Overflow
A technique I've used successfully is to use a variable to hold the value of the outer block, which then can use templating...
Read more >Where variables can be used - GitLab Documentation
As it's described in the CI/CD variables documentation, you can define many different variables. Some of them can be used for all GitLab...
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 FreeTop 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
Top GitHub Comments
Tried again and it worked, I think it was due to me not deleting
node_modules
before reinstalling like you say! Don’t think it’s related to that other issue though.Thanks for your time anyway, I appreciate it
Ah ok, thanks for the info!