From bb5c5746e87ecaa3ed90f2cd57de75984fc45748 Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Wed, 12 Aug 2020 16:44:44 -0700 Subject: [PATCH] chore: write empty object to the data file by default --- plugins/gatsby-source-swiftype/gatsby-node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gatsby-source-swiftype/gatsby-node.js b/plugins/gatsby-source-swiftype/gatsby-node.js index 6b312d62c..97ec0b6fa 100644 --- a/plugins/gatsby-source-swiftype/gatsby-node.js +++ b/plugins/gatsby-source-swiftype/gatsby-node.js @@ -6,7 +6,7 @@ exports.onPreBootstrap = ({ reporter }, pluginOptions) => { if (!fs.existsSync(dataFile)) { reporter.info('Creating related-pages.json file'); - fs.writeFileSync(dataFile, ''); + fs.writeFileSync(dataFile, '{}'); } };