Skip to content

Commit

Permalink
fix: admin - general settings not saving with empty value (requarks#5165
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rajatchauhanyti committed Apr 9, 2022
1 parent f45d789 commit 7f2c1f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/graph/resolvers/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ module.exports = {
SiteMutation: {
async updateConfig(obj, args, context) {
try {
if (args.host) {
if (args.hasOwnProperty('host')) {
let siteHost = _.trim(args.host)
if (siteHost.endsWith('/')) {
siteHost = siteHost.slice(0, -1)
}
WIKI.config.host = siteHost
}

if (args.title) {
if (args.hasOwnProperty('title')) {
WIKI.config.title = _.trim(args.title)
}

if (args.company) {
if (args.hasOwnProperty('company')) {
WIKI.config.company = _.trim(args.company)
}

if (args.contentLicense) {
if (args.hasOwnProperty('contentLicense')) {
WIKI.config.contentLicense = args.contentLicense
}

if (args.logoUrl) {
if (args.hasOwnProperty('logoUrl')) {
WIKI.config.logoUrl = _.trim(args.logoUrl)
}

Expand Down

0 comments on commit 7f2c1f3

Please sign in to comment.