Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
errors with SiteURL not nil Possible fix for Issue #115
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleedavis committed Jun 13, 2019
1 parent 2cfd53a commit bebcdea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/activate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit bebcdea

Please sign in to comment.