Skip to content

Commit

Permalink
fix: defaults not set in gatsby-node
Browse files Browse the repository at this point in the history
Resolves error on createPage when no options are passed to the plugin.
  • Loading branch information
Pyrax committed Aug 6, 2020
1 parent 9a68f4a commit a7a3828
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gatsby-theme-contact/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = ({ contactPath = '/contact', successPath = '/thanks' }) => ({
module.exports = {
plugins: [`gatsby-plugin-theme-ui`]
})
}
2 changes: 1 addition & 1 deletion gatsby-theme-contact/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
exports.createPages = ({ actions }, options) => {
const { contactPath, successPath } = options
const { contactPath = '/contact', successPath = '/thanks' } = options

const pages = [
{
Expand Down

0 comments on commit a7a3828

Please sign in to comment.