Skip to content

Commit 2f896e6

Browse files
committed
Fix issue with setup flow
1 parent 39a15a1 commit 2f896e6

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

lib/setup.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module.exports.getSetupForData = async ({
8484
new inquirer.Separator(),
8585
{
8686
name: "Other",
87-
value: null
87+
value: undefined
8888
}
8989
]
9090
},
@@ -107,7 +107,7 @@ module.exports.getSetupForData = async ({
107107
filter: value => ({ fileNameField: value })
108108
},
109109
{
110-
when: ({ location }) => location === null,
110+
when: ({ location }) => location === undefined,
111111
type: "input",
112112
name: "location",
113113
message: "Insert the location for the file",
@@ -218,13 +218,13 @@ module.exports.getSetupForPage = async ({
218218
`content/${model.modelName}`,
219219
,
220220
new inquirer.Separator(),
221-
{ name: "Other", value: null }
221+
{ name: "Other", value: undefined }
222222
].filter(Boolean)
223223
},
224224
{
225225
type: "input",
226226
name: "directory",
227-
when: ({ directory }) => directory === null,
227+
when: ({ directory }) => directory === undefined,
228228
message: "Insert the location for this collection."
229229
},
230230
{
@@ -297,10 +297,9 @@ module.exports.getSetupForPage = async ({
297297
{
298298
type: "confirm",
299299
name: "addDateField",
300-
message: ({ directory }) =>
301-
`Do you want to add a 'date' field to the frontmatter? ${chalk.reset.dim(
302-
`(e.g. field: 2019-12-31)`
303-
)}`,
300+
message: `Do you want to add a 'date' field to the frontmatter? ${chalk.reset.dim(
301+
`(e.g. field: 2019-12-31)`
302+
)}`,
304303
default: true
305304
},
306305
{

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sourcebit-target-hugo",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "A Sourcebit plugin for Hugo",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)