shopify-headless-theme icon indicating copy to clipboard operation
shopify-headless-theme copied to clipboard

fix: issue with incorrect conditions

Open slavamak opened this issue 9 months ago • 1 comments

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.

slavamak avatar May 02 '24 17:05 slavamak