diff options
Diffstat (limited to 'app/app.go')
-rw-r--r-- | app/app.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/app.go b/app/app.go index c4d11cb63..2c179f812 100644 --- a/app/app.go +++ b/app/app.go @@ -66,6 +66,8 @@ type App struct { clientLicenseValue atomic.Value licenseListeners map[string]func() + timezones atomic.Value + siteURL string newStore func() store.Store @@ -127,6 +129,9 @@ func New(options ...Option) (outApp *App, outErr error) { return nil, err } app.EnableConfigWatch() + + app.LoadTimezones() + if err := utils.InitTranslations(app.Config().LocalizationSettings); err != nil { return nil, errors.Wrapf(err, "unable to load Mattermost translation files") } @@ -439,7 +444,11 @@ func (a *App) WaitForGoroutines() { } func (a *App) HTMLTemplates() *template.Template { - return a.htmlTemplateWatcher.Templates() + if a.htmlTemplateWatcher != nil { + return a.htmlTemplateWatcher.Templates() + } + + return nil } func (a *App) HTTPClient(trustURLs bool) *http.Client { |