From 07e01db42bdd8426608053017f5363bd6795e741 Mon Sep 17 00:00:00 2001 From: Val <59399970+Ruulul@users.noreply.github.com> Date: Thu, 4 May 2023 19:29:34 -0300 Subject: [PATCH] do not modify the original options object this was leading to a bug in my project where a second autodeebee I was creating had the default opts object corrupted, making the autobase never get started --- autodeebee.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autodeebee.js b/autodeebee.js index cca9a9a..36eb157 100644 --- a/autodeebee.js +++ b/autodeebee.js @@ -33,7 +33,7 @@ module.exports = class Autodeebee { } sub (name) { - const opts = this.opts + const opts = { ...this.opts } opts.sub = true const auto = new Autodeebee(this.autobase, opts) auto.bee = this.bee.sub(name)