Browse Source

fix: admin - general settings not saving with empty value (#5165)

pull/5175/head
rajatchauhanyti 2 years ago
committed by GitHub
parent
commit
44b3fd1794
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions
  1. 10
      server/graph/resolvers/site.js

10
server/graph/resolvers/site.js

@ -38,7 +38,7 @@ 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)
@ -46,19 +46,19 @@ module.exports = {
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)
}

Loading…
Cancel
Save