Skip to content

Commit

Permalink
Merge pull request #11 from mottox2/null_category
Browse files Browse the repository at this point in the history
カテゴリが空の時にビルドが通らない問題を修正
  • Loading branch information
mottox2 authored Jan 27, 2019
2 parents 3e7ae8d + 3edeb9e commit 1c53990
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-source-esa",
"version": "1.1.2",
"version": "1.1.3",
"description": "Gatsby source plugin for building websites using esa.io as a data source.",
"main": "gatsby-node.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports.sourceNodes = async ({
createNode({
...post,
body___NODE: bodyNode.id,
relative_category: post.category.replace(new RegExp(`${baseCategory}/?`), ''),
relative_category: (post.category || '').replace(new RegExp(`${baseCategory}/?`), ''),
id: nodeId,
children: [],
parent: null,
Expand Down

0 comments on commit 1c53990

Please sign in to comment.