From adf9a672e5e4fc2616168772c074d6ca5a11faa0 Mon Sep 17 00:00:00 2001 From: Tim Kleyersburg Date: Tue, 25 Jan 2022 19:50:51 +0100 Subject: [PATCH] fix: correctly check for config existence before overwriting --- .eleventy.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index e011497..6ad2955 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -6,7 +6,7 @@ module.exports = (eleventyConfig, options) => { eleventyConfig.on('afterBuild', () => { const config = makeConfig('') - if (!config.length) { + if (Object.keys(config).length === 0) { config.token = process.env.TORCHLIGHT_TOKEN config.highlight = { input: '_site' diff --git a/package.json b/package.json index 953bb17..e8b603d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eleventy-plugin-torchlight", - "version": "0.1.6", + "version": "0.1.7", "description": "This plugin runs your HTML files through Torchlight.dev for syntax highlighting", "homepage": "https://github.com/timkley/eleventy-plugin-torchlight", "main": ".eleventy.js",