-
I've read through https://liquidjs.com/tutorials/options.html, and I've searched the discussions in this repo, and I can't find any mention of a configuration option that allows us to render blank instead of throwing error when attempting to render a file that doesn't exist. Example {% render "non-existent-file" %} In comparison, the ruby version of liquid, found at https://github.com/Shopify/liquid, renders blank instead of blowing up the page if a {% render %} tag references a non-existent file. I want {% render %} to return blank instead of throwing error because in my use case, it is possible to delete files, in addition to other reasons which are far too complex to get into. In liquidjs, is there a configuration option for this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I figured it out. |
Beta Was this translation helpful? Give feedback.
I figured it out.
There is configuration option "fs", and within this are methods "existsSync" and "exists". These were returning false if file not found. I just make it so that it always returns true.