Skip to content

Commit

Permalink
chore(examples): shorten if else statement (#11042)
Browse files Browse the repository at this point in the history
<!--
  Have any questions? Check out the contributing docs at https://gatsby.app/contribute, or
  ask in this Pull Request and a Gatsby maintainer will be happy to help :)
-->

## Description
There is a statement which can be simplified to a simple single return statement.
<!-- Write a brief description of the changes introduced by this PR -->

## Related Issues

<!--
  Link to the issue that is fixed by this PR (if there is one)
  e.g. Fixes #1234, Addresses #1234, Related to #1234, etc.
-->
  • Loading branch information
DanielRuf authored and wardpeet committed Jan 15, 2019
1 parent c865bac commit 6590a34
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions examples/gatsbygram/gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ exports.shouldUpdateScroll = args => {
const windowWidth = window.innerWidth
// Scroll position only matters on mobile as on larger screens, we use a
// modal.
if (windowWidth < 750) {
return true
} else {
return false
}
return windowWidth < 750
}

exports.onInitialClientRender = () => {
Expand Down

0 comments on commit 6590a34

Please sign in to comment.