Skip to content

Commit 44b3fd1

Browse files
fix: admin - general settings not saving with empty value (#5165)
1 parent eeee6c9 commit 44b3fd1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/graph/resolvers/site.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,27 @@ module.exports = {
3838
SiteMutation: {
3939
async updateConfig(obj, args, context) {
4040
try {
41-
if (args.host) {
41+
if (args.hasOwnProperty('host')) {
4242
let siteHost = _.trim(args.host)
4343
if (siteHost.endsWith('/')) {
4444
siteHost = siteHost.slice(0, -1)
4545
}
4646
WIKI.config.host = siteHost
4747
}
4848

49-
if (args.title) {
49+
if (args.hasOwnProperty('title')) {
5050
WIKI.config.title = _.trim(args.title)
5151
}
5252

53-
if (args.company) {
53+
if (args.hasOwnProperty('company')) {
5454
WIKI.config.company = _.trim(args.company)
5555
}
5656

57-
if (args.contentLicense) {
57+
if (args.hasOwnProperty('contentLicense')) {
5858
WIKI.config.contentLicense = args.contentLicense
5959
}
6060

61-
if (args.logoUrl) {
61+
if (args.hasOwnProperty('logoUrl')) {
6262
WIKI.config.logoUrl = _.trim(args.logoUrl)
6363
}
6464

0 commit comments

Comments
 (0)