@symbo.ls/scratch 0.6.0 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/system/theme.js +3 -4
package/package.json
CHANGED
package/src/system/theme.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { getColor
|
|
3
|
+
import { getColor } from './color'
|
|
4
4
|
import { CONFIG, CSS_VARS } from '../factory' // eslint-disable-line
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
isObject,
|
|
8
8
|
isString,
|
|
9
9
|
isObjectLike,
|
|
10
|
-
merge,
|
|
11
10
|
isArray
|
|
12
11
|
} from '../utils'
|
|
13
12
|
|
|
@@ -187,12 +186,12 @@ const recursiveTheme = val => {
|
|
|
187
186
|
}
|
|
188
187
|
|
|
189
188
|
export const getMediaTheme = (val, key, themeObj) => {
|
|
190
|
-
if (!isString(val)) {
|
|
189
|
+
if (!val || !isString(val)) {
|
|
191
190
|
if ((ENV === 'test' || ENV === 'development') && CONFIG.verbose) console.warn(val, '- type for color is not valid')
|
|
192
191
|
return
|
|
193
192
|
}
|
|
194
193
|
const [name, modifier] = isArray(val) ? val : val.split(' ')
|
|
195
194
|
let value = CONFIG.THEME[name]
|
|
196
|
-
if (modifier && value[modifier]) value = value[modifier]
|
|
195
|
+
if (value && modifier && value[modifier]) value = value[modifier]
|
|
197
196
|
return recursiveTheme(value)
|
|
198
197
|
}
|