Skip to content

Commit

Permalink
fix: correctly check for config existence before overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
timkley committed Jan 25, 2022
1 parent d4c1e01 commit adf9a67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit adf9a67

Please sign in to comment.