Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4e5f234

Browse files
landabasojavivelasco
authored andcommitted
Check for valid types in themes. (#45)
* Check for valid types in themes. Fixes #44 * Update themr.js
1 parent b2032bb commit 4e5f234

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/components/themr.js‎

Lines changed: 7 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /