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

Hide hero button if no text for label entered #16

Merged
merged 1 commit into from
Aug 6, 2019

Conversation

JoeBerkley
Copy link
Contributor

I've done a few tests with this, such as entering a load of spaces in the admin area, and they get trimmed on saving and it gets reduced back to null 😄

@peterkeating
Copy link
Member

Interesting, I usually use null, but you've used nil? What's the difference?

@JoeBerkley
Copy link
Contributor Author

JoeBerkley commented Aug 6, 2019

Interesting, I usually use null, but you've used nil? What's the difference?

I believe I'd ran into an issue where I had set a link, and then unset it, which still had the property initialized, but it was just an empty string.

I believe I've also tried the blank liquid literal, but for some reason that also wasnt working as expected, so comparing against nil did what I needed to.

Heres a link to an issue I found while trying to solve this a few weeks ago Shopify/liquid#223 and theres a better explaination here Shopify/liquid#89

@JoeBerkley JoeBerkley merged commit 0ef268d into master Aug 6, 2019
@JoeBerkley JoeBerkley deleted the hotfix/empty-hero-button branch August 6, 2019 08:42
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