From efce68068e24513c832b5a692c016c977c49d362 Mon Sep 17 00:00:00 2001 From: okg21 Date: Fri, 14 Jun 2024 15:09:29 +0300 Subject: [PATCH] fix for Solid color scheme not loading #689 special cases --- app/js/app-cy.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/js/app-cy.js b/app/js/app-cy.js index 6a7df99a..a997e580 100644 --- a/app/js/app-cy.js +++ b/app/js/app-cy.js @@ -1391,8 +1391,13 @@ module.exports = function (chiseInstance) { var opt = {}; keys.forEach(function(key) { - if (!isNaN(node.data(key)) || key === 'background-image' || (node.data('class') === 'unspecified entity' || node.data('class') === 'perturbing agent')) { - opt[key] = node.data(key); + var value = node.data(key); + var isSpecialClass = node.data('class') === 'unspecified entity' || node.data('class') === 'perturbing agent'; + + if (isNaN(value) && key !== 'background-image' && !isSpecialClass) { + opt[key] = undefined; + } else { + opt[key] = value; } });