New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utils.createFrame is not a function #8
Comments
Inside the forEach block you should use the keyword 'this' to refer to the current item in the array. So replace the x.0.field with this.field
|
Note that in your handlebars you reference "entries" directly, but that is another array, so you will need another forEach block to read each individual entry in that array (even though there is only one, you still need to access it like an array of more than one). Something similar to:
|
Hrm. Thanks for pointing out that I'd missed that inner block. Unfortunately, I can't seem to get a forEach to work anywhere. I also tried with the fromClassListVariant, but I'm still getting the same createFrame error.
|
So, not sure what's going on, but I tried using #each instead of the helper #forEach and it worked. Unfortunately, I don't really know if this will have any other effects down the line... Update: Ahh. So other helper functions like isLast don't work with each. |
Any chance you've had time and inclination to look at this? Still trying to figure out if it's my code, my source, or something in the import tool. Thanks |
I just had a look, and #forEach is broken in my distribution. |
It looks like match from Handlebars-Helpers is also missing some modules, perhaps related. |
I've changed the plugin to use a fork of handlebars-helpers (see https://github.com/Budibase/handlebars-helpers) which builds properly. |
thanks for taking the time to fix this :) |
Thanks for the importer, I've finally got time to work through creating a template to import spells from 5etools. I'm attempting to use the forEach helper from handlebars-helpers library. During the import, I get the above error in the console. I've included the relevant block from my template below, as well as the json. Any ideas or suggestions as to what I'm doing wrong?
The text was updated successfully, but these errors were encountered: