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

[gatsby] Compare location object instead of just pathname #4292

Merged
merged 2 commits into from
Mar 2, 2018
Merged

[gatsby] Compare location object instead of just pathname #4292

merged 2 commits into from
Mar 2, 2018

Conversation

paulathevalley
Copy link
Contributor

re: #3802

This PR compares window.location and location objects instead of just their pathnames.

Let me know if there is a better approach. Thanks!

@gatsbybot
Copy link
Collaborator

gatsbybot commented Mar 1, 2018

Deploy preview for gatsbygram ready!

Built with commit 17230a8

https://deploy-preview-4292--gatsbygram.netlify.com

@@ -12,6 +12,7 @@ import history from "./history"
window.___history = history
import emitter from "./emitter"
window.___emitter = emitter
import { isEqual } from "lodash"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the shallow-compare package as we're already using that so it require any extra code

import shallowCompare from "shallow-compare"

@KyleAMathews
Copy link
Contributor

Thanks for jumping on a fix!

@KyleAMathews KyleAMathews merged commit 9b35ece into gatsbyjs:master Mar 2, 2018
@KyleAMathews
Copy link
Contributor

Thanks!

@ghost ghost assigned KyleAMathews Mar 2, 2018
@KyleAMathews
Copy link
Contributor

Comparing the window and router location objects didn't work as the window object has a bunch of other stuff on it. Instead it seems best to just compare the things we care about directly.

Put up a PR for this #4339

@jlengstorf
Copy link
Contributor

Hiya @paulathevalley! 👋

This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here.

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (We’ve got t-shirts and hats, plus some socks that are really razzing our berries right now.)
  2. If you’re not already part of it, we just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again! 💪💜

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.

4 participants