shopify-headless-theme
shopify-headless-theme copied to clipboard
fix: issue with incorrect conditions
Hi there! I found a problem here. We cannot use expressions in a variable declaration. For example, this was discussed here. So the variable should_redirect
will always be truly except when template
is not defined. Because should_redirect
is equal to template
in fact and will return a string.
Also when multiple conditions are used, the order works from right to left. I hope this makes sense. Thanks.