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

Simplify conditional in SeoTag::Drop#date_modified #343

Merged

Conversation

ashmaroli
Copy link
Member

This removes the unnecessary checks in the conditional and instead directly evaluates the expression to short-circuit the conditional.

(nil.to_liquid returns nil. So a NoMethodError won't be raised when page["last_modified_at"] isnil.)

@DirtyF
Copy link
Member

DirtyF commented Oct 8, 2020

@jekyll: merge +dev

@jekyllbot jekyllbot merged commit e1ff8ee into jekyll:master Oct 8, 2020
jekyllbot added a commit that referenced this pull request Oct 8, 2020
@ashmaroli ashmaroli deleted the simplify-date-modified-conditional branch October 8, 2020 15:14
@ashmaroli
Copy link
Member Author

Thank you @DirtyF :)

@jekyll jekyll locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants