From b0b9c7ce475d56ca685ddc8878c80575f9d7e5ca Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Wed, 12 Jun 2024 09:27:18 -0500 Subject: [PATCH] Fix missing name in duplicate debug statement --- src/UserConfig.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UserConfig.js b/src/UserConfig.js index dddb8cda0..cc1944f27 100644 --- a/src/UserConfig.js +++ b/src/UserConfig.js @@ -398,8 +398,9 @@ class UserConfig { /* Async friendly in 3.0 */ addPlugin(plugin, options = {}) { + // First addPlugin of a unique plugin wins if (plugin?.eleventyPluginOptions?.unique && this.hasPlugin(plugin)) { - debug("Skipping duplicate unique addPlugin for %o", this.plugin); + debug("Skipping duplicate unique addPlugin for %o", this._getPluginName(plugin)); return; } @@ -459,7 +460,7 @@ class UserConfig { _executePlugin(plugin, options) { let name = this._getPluginName(plugin); let ret; - debug(`Adding ${name || "anonymous"} plugin`); + debug(`Adding %o plugin`, name || "anonymous"); let pluginBenchmark = this.benchmarks.aggregate.get("Configuration addPlugin"); if (typeof plugin === "function") {