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

Convert var to let & Convert Non-strict to strict equality checking #2904

Merged
merged 4 commits into from
Nov 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion packages/gatsby-module-loader/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports.prototype.apply = function(compiler) {
hash
) {
if (chunk.chunks.length > 0) {
var buf = []
let buf = []

buf.push(``)
buf.push(``)
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-react-router-scroll/src/StateStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ export default class SessionStorage {
getStateKey(location, key) {
const locationKey = location.key
const stateKeyBase = `${STATE_KEY_PREFIX}${locationKey}`
return key == null ? stateKeyBase : `${stateKeyBase}|${key}`
return (key === null || typeof key === `undefined`) ? stateKeyBase : `${stateKeyBase}|${key}`
}
}