forked from pinks/eris
1
0
Fork 0

fix: clearing paused reason

This commit is contained in:
pinks 2023-11-18 00:49:39 +01:00
parent e7d292df60
commit ec4a3c893e
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ export async function getConfig(): Promise<Config> {
export async function setConfig(newConfig: Partial<Config>): Promise<void> { export async function setConfig(newConfig: Partial<Config>): Promise<void> {
const oldConfig = await getConfig(); const oldConfig = await getConfig();
const config: Config = { const config: Config = {
pausedReason: newConfig.pausedReason ?? oldConfig.pausedReason, pausedReason: newConfig.pausedReason === undefined
? oldConfig.pausedReason
: newConfig.pausedReason,
maxUserJobs: newConfig.maxUserJobs ?? oldConfig.maxUserJobs, maxUserJobs: newConfig.maxUserJobs ?? oldConfig.maxUserJobs,
maxJobs: newConfig.maxJobs ?? oldConfig.maxJobs, maxJobs: newConfig.maxJobs ?? oldConfig.maxJobs,
defaultParams: newConfig.defaultParams ?? oldConfig.defaultParams, defaultParams: newConfig.defaultParams ?? oldConfig.defaultParams,