Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/gatsby/cache-dir/production-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"

import pages from "./pages.json"
import redirects from "./redirects.json"
import ComponentRenderer from "./component-renderer"
Expand Down Expand Up @@ -62,8 +63,8 @@ apiRunnerAsync(`onClientEntry`).then(() => {
pathname = redirect.toPath
}

// If we're already at this path, do nothing.
if (window.location.pathname === pathname) {
// If we're already at this location, do nothing.
if (isEqual(window.location, location)) {
return
}

Expand Down