From bebcdea2ca6eca6aea20bebb61fe769a5a2b6b68 Mon Sep 17 00:00:00 2001 From: Scott Lee Davis Date: Wed, 12 Jun 2019 19:46:29 -0700 Subject: [PATCH] errors with SiteURL not nil Possible fix for Issue #115 --- server/activate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/activate.go b/server/activate.go index be7e859..911d1bd 100755 --- a/server/activate.go +++ b/server/activate.go @@ -73,6 +73,9 @@ func (p *Plugin) OnDeactivate() error { func (p *Plugin) OnConfigurationChange() error { p.ServerConfig = p.API.GetConfig() + if p.ServerConfig.ServiceSettings.SiteURL == nil { + return errors.New("siteURL is not set. Please set a siteURL and restart the plugin") + } p.URL = fmt.Sprintf("%s", *p.ServerConfig.ServiceSettings.SiteURL) if err := p.TranslationsPreInit(); err != nil { return errors.Wrap(err, "failed to initialize translations")