Skip to content
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

Fix for custom tag rendering #1750

Merged
merged 1 commit into from
Dec 10, 2023
Merged

Conversation

IevaGraz
Copy link
Contributor

After #1091 the behaviour when a render method of custom tags returns nil has changed. Before something like

 Liquid::Template.parse('foo {% custom_url%20SOME-CUSTOM-PARAM %}').render()

that depends on

 class CustomUrl < Liquid::Tag
     ...
    def render(_context)
      return unless something

      #build url
    end

Would return just foo .
After the change it returns foo Liquid error: internal
Because this line here throws TypeError: no implicit conversion of nil into String

@ianks ianks self-requested a review December 10, 2023 15:08
@ianks
Copy link
Contributor

ianks commented Dec 10, 2023

Just checked this with our app's CI and it looks good. Thanks for the fix!

@ianks ianks merged commit 0f0d5d8 into Shopify:main Dec 10, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants