How to fix Broken HTML that has been detected in your theme's sections/main-product.liquid file.

How to fix Broken HTML that has been detected in your theme's sections/main-product.liquid file.

chriss
Visitor
1 0 1

{%- liquid
assign isModal = false 
if template == 'product.modal'
assign isModal = true
endif
-%}

1. isModal shows

  • The variable 'isModal' uses wrong naming format

isModal: boolean

 

2. isModal shows 

  • The variable 'isModal' uses wrong naming format

How can I fix this?

 
Reply 1 (1)

bluetree
Shopify Partner
22 3 17

@chriss use snake case🐍

ref: https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/variable-name

 

 

{%- liquid
assign is_modal = false 
if template == 'product.modal'
assign is_modal = true
endif
-%}

 

 

あおき