fix(deeplinking) Consider deprecated config (#12758)

This commit is contained in:
Horatiu Muresan 2023-01-12 11:04:45 +02:00 committed by GitHub
parent 122e80dcf1
commit 9422f48536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -298,8 +298,13 @@ function _translateInterfaceConfig(oldValue: IConfig) {
}
}
// if we have `deeplinking` defined, ignore deprecated values. Otherwise, compose the config.
if (!oldValue.deeplinking) {
// if we have `deeplinking` defined, ignore deprecated values, except `disableDeepLinking`.
// Otherwise, compose the config.
if (oldValue.deeplinking && newValue.deeplinking) { // make TS happy
newValue.deeplinking.disabled = oldValue.deeplinking.hasOwnProperty('disabled')
? oldValue.deeplinking.disabled
: Boolean(oldValue.disableDeepLinking);
} else {
const disabled = Boolean(oldValue.disableDeepLinking);
const deeplinking: IDeeplinkingConfig = {
desktop: {} as IDeeplinkingPlatformConfig,