Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 3a82dab

Browse files
sagirkmbj36
authored andcommitted
fix: Initialize with null to assign a deliberate non-value (#178)
* fix: Initialize with null to assign a deliberate non-value * chore: Update .gitignore - Ignore the .history folder generated by VSCode local history extension
1 parent d986949 commit 3a82dab

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ package-lock.json
1212
.firebase/*
1313
coverage
1414
.vscode
15+
.history

gatsby-node.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ exports.createPages = ({ graphql, actions }) => {
7070
parent: { relativePath },
7171
} = node;
7272

73-
let previousNodeData = undefined;
73+
let previousNodeData = null;
7474
const previousNode = index === 0 ? undefined : edges[index - 1].node;
7575
if (previousNode) {
7676
previousNodeData = {
@@ -79,7 +79,7 @@ exports.createPages = ({ graphql, actions }) => {
7979
};
8080
}
8181

82-
let nextNodeData = undefined;
82+
let nextNodeData = null;
8383
const nextNode =
8484
index === edges.length - 1 ? undefined : edges[index + 1].node;
8585
if (nextNode) {
@@ -121,17 +121,17 @@ exports.createPages = ({ graphql, actions }) => {
121121
},
122122
});
123123
if (page.slug === 'introduction-to-nodejs')
124-
createPage({
125-
path: `/`,
126-
component: docTemplate,
127-
context: {
128-
slug: page.slug,
129-
next: page.next,
130-
previous: page.previous,
131-
relativePath: page.relativePath,
132-
navigationData: navigationData,
133-
},
134-
})
124+
createPage({
125+
path: `/`,
126+
component: docTemplate,
127+
context: {
128+
slug: page.slug,
129+
next: page.next,
130+
previous: page.previous,
131+
relativePath: page.relativePath,
132+
navigationData: navigationData,
133+
},
134+
});
135135
});
136136
})
137137
);

0 commit comments

Comments
 (0)