Fix "undefined" when downloading a backup

TotallyNotElite committed Dec 22, 2019 at 12:36 UTC 787e8ceaec2a50bdbd5ff4def84920c8af095098
1 file changed +1 -1
webserver.js
+1 -1
@@ -2930,7 +2930,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2930 archive.on('error', function (err) { throw err; });
2931
2932 // Set the archive name
2933 - res.attachment(domain.title + '-Backup-' + new Date().toLocaleDateString().replace('/', '-').replace('/', '-') + '.zip');
2933 + res.attachment((domain.title ? domain.title : "Meshcentral") + '-Backup-' + new Date().toLocaleDateString().replace('/', '-').replace('/', '-') + '.zip');
2934
2935 // Pipe archive data to the file
2936 archive.pipe(res);