File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ export const DebugLoggingOptionId = 'debugLogging'
2222 * logs, to make it easier to debug the module in case of error. Add a default
2323 * value for that option to older configs.
2424 */
25- export function tryUpdateConfigWithDebugLogging ( config : RawConfig | null ) : boolean {
26- if ( config !== null && ! ( DebugLoggingOptionId in config ) ) {
25+ export function tryUpdateConfigWithDebugLogging ( config : RawConfig ) : boolean {
26+ if ( ! ( DebugLoggingOptionId in config ) ) {
2727 config [ DebugLoggingOptionId ] = false
2828 return true
2929 }
Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ function ActionUpdater(
2020 }
2121}
2222
23- function ConfigUpdater ( tryUpdate : ( config : RawConfig | null ) => boolean ) : CompanionStaticUpgradeScript < RawConfig > {
23+ function ConfigUpdater ( tryUpdate : ( config : RawConfig ) => boolean ) : CompanionStaticUpgradeScript < RawConfig > {
2424 return ( _context : CompanionUpgradeContext < RawConfig > , props : CompanionStaticUpgradeProps < RawConfig > ) => {
2525 return {
2626 updatedActions : [ ] ,
27- updatedConfig : tryUpdate ( props . config ) ? props . config : null ,
27+ updatedConfig : props . config !== null && tryUpdate ( props . config ) ? props . config : null ,
2828 updatedFeedbacks : [ ] ,
2929 }
3030 }
@@ -35,4 +35,4 @@ export const UpgradeScripts = [
3535 ConfigUpdater ( tryUpdateConfigWithDebugLogging ) ,
3636 ActionUpdater ( tryUpdateRecallSetPresetActions ) ,
3737 ActionUpdater ( tryUpdatePresetAndSpeedEncodingsInActions ) ,
38- ]
38+ ] satisfies CompanionStaticUpgradeScript < RawConfig > [ ]
You can’t perform that action at this time.
0 commit comments