Skip to content

Commit

Permalink
Merge pull request #2233 from lukeromanowicz/fix/theme-registration
Browse files Browse the repository at this point in the history
Fix theme registration
  • Loading branch information
pkarw committed Jan 18, 2019
2 parents f87f3df + f33e61c commit 2239e7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/lib/themes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export function registerTheme (themeName, app, routes, store, config, ssrContext) {
let themeEntryPoint = require('theme/index.js').initTheme
if (themeEntryPoint != null && themeEntryPoint.hasOwnProperty('default')) {
themeEntryPoint.default(app, routes, store, config, ssrContext) // register theme
const themeEntryPoint = require('theme/index.js')
if (themeEntryPoint != null && themeEntryPoint.initTheme) {
themeEntryPoint.initTheme(app, routes, store, config, ssrContext) // register theme
} else {
throw new Error('Wrong theme name: ' + themeName)
}
Expand Down

0 comments on commit 2239e7a

Please sign in to comment.