2
0
mirror of https://github.com/PitPik/colorPicker.git synced 2025-09-24 16:40:57 -06:00

Fix error where typ and from could have the same value

This commit is contained in:
René Løwe Jacobsen 2015-03-20 14:15:39 +01:00
parent c3c9a900ac
commit d511e2ab72

View File

@ -214,7 +214,9 @@
if (!ranges[typ][typ]) { // no alpha|HEX if (!ranges[typ][typ]) { // no alpha|HEX
if (type !== typ && typ !== 'XYZ') { if (type !== typ && typ !== 'XYZ') {
from = exceptions[typ] || 'rgb'; from = exceptions[typ] || 'rgb';
colors[typ] = convert[from + '2' + typ](colors[from]); if (typ !== from) {
colors[typ] = convert[from + '2' + typ](colors[from]);
}
} }
if (!RND[typ]) RND[typ] = {}; if (!RND[typ]) RND[typ] = {};