undefined typeof
This commit is contained in:
parent
d62716e301
commit
0eb63de209
13 changed files with 25 additions and 25 deletions
|
|
@ -523,7 +523,7 @@ export const generateColors = (themeData) => {
|
|||
(acc, [k, v]) => {
|
||||
if (!v) return acc
|
||||
acc.solid[k] = rgb2hex(v)
|
||||
acc.complete[k] = typeof v.a === 'undefined' ? rgb2hex(v) : rgba2css(v)
|
||||
acc.complete[k] = v.a === undefined ? rgb2hex(v) : rgba2css(v)
|
||||
return acc
|
||||
},
|
||||
{ complete: {}, solid: {} },
|
||||
|
|
@ -545,7 +545,7 @@ export const generateColors = (themeData) => {
|
|||
export const generateRadii = (input) => {
|
||||
let inputRadii = input.radii || {}
|
||||
// v1 -> v2
|
||||
if (typeof input.btnRadius !== 'undefined') {
|
||||
if (input.btnRadius !== undefined) {
|
||||
inputRadii = Object.entries(input)
|
||||
.filter(([k]) => k.endsWith('Radius'))
|
||||
.reduce((acc, e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue