From 833819c63fd435ebec43d528c6dbd810b9cea4a4 Mon Sep 17 00:00:00 2001 From: Oj Date: Wed, 2 Jun 2021 21:11:30 +0100 Subject: [PATCH] [GenericTheme > Settings] Fix hex color checking when not color type causing bad values oninput --- src/preprocessors/genericTheme.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/preprocessors/genericTheme.js b/src/preprocessors/genericTheme.js index f0c15f3..db19a27 100644 --- a/src/preprocessors/genericTheme.js +++ b/src/preprocessors/genericTheme.js @@ -120,12 +120,7 @@ export default (manifest, content, repo) => { .replace('Dnd', 'DND')}', oninput: (val) => { - ${ - x[1][0] !== '#' - ? `val = parseInt(val.substring(1, 3), 16).toString() + ', ' + parseInt(val.substring(3, 5), 16).toString() + ', ' + parseInt(val.substring(5, 7), 16).toString()` - : '' - } - + ${x[2] === 'color' && x[1][0] !== '#' ? `val = parseInt(val.substring(1, 3), 16).toString() + ', ' + parseInt(val.substring(3, 5), 16).toString() + ', ' + parseInt(val.substring(5, 7), 16).toString()` : ''} console.log(val); document.body.style.setProperty('${x[0]}', val); @@ -167,4 +162,7 @@ export default (manifest, content, repo) => { } };`; }; +<<<<<<< HEAD +======= +>>>>>>> 39784f0 ([GenericTheme > Settings] Fix hex color checking when not color type causing bad values oninput)