Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
fix: add default values to validation (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored Oct 28, 2020
1 parent 9c328fc commit 38f9ab1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ if (process.env.GATSBY_EXPERIMENTAL_PLUGIN_OPTION_VALIDATION) {
exports.pluginOptionsSchema = ({ Joi }) =>
Joi.object({
...getDeprecatedOptions({ Joi }),
saveButton: Joi.alternatives().try(
Joi.boolean(),
Joi.object({
round: Joi.boolean(),
tall: Joi.boolean(),
}),
),
saveButton: Joi.alternatives()
.try(
Joi.boolean(),
Joi.object({
round: Joi.boolean().default(false),
tall: Joi.boolean().default(true),
}),
)
.default(false),
});
} else {
const deprecationWarning = `[gatsby-plugin-pinterest] From now on, you should use the 'saveButton' option to show Pinterest's save button on images.
Expand Down

0 comments on commit 38f9ab1

Please sign in to comment.