From 7b5ce84ffeeee51a00505e2f87d6c722caea5d8a Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 12 Feb 2023 13:57:39 +0200 Subject: [PATCH] Adjust script --- app/root.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/root.tsx b/app/root.tsx index dcdb5f365..f9e55c172 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -349,15 +349,17 @@ function PlaywireScripts() { __html: ` var pwUnits = ${JSON.stringify(units)} - var init = function () { - ramp - .addUnits(pwUnits) - .then(() => { - ramp.displayUnits() - }).catch((e) =>{ - ramp.displayUnits() - console.log(e) - }) + var init = function () { + ramp.destroyUnits('all').then(() => { + ramp + .addUnits(pwUnits) + .then(() => { + ramp.displayUnits() + }).catch((e) =>{ + ramp.displayUnits() + console.log(e) + }) + }) } ramp.onReady = function() {