Skip to content

Commit 67e207a

Browse files
landabasodavid-slayte
authored andcommitted
Check for valid types in themes. (javivelasco#45)
* Check for valid types in themes. Fixes javivelasco#44 * Update themr.js
1 parent ade66de commit 67e207a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: src/components/themr.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,13 @@ export function themeable(original = {}, mixin) {
178178

179179
//merging reducer
180180
(result, key) => {
181-
const originalValue = original[key] || ''
182-
const mixinValue = mixin[key] || ''
181+
182+
const originalValue = typeof original[key] !== 'function'
183+
? (original[key] || '')
184+
: '';
185+
const mixinValue = typeof mixin[key] !== 'function'
186+
? (mixin[key] || '')
187+
: '';
183188

184189
let newValue
185190

0 commit comments

Comments
 (0)