fix(deeplinking) Consider deprecated config

This commit is contained in:
Horatiu Muresan 2023-01-11 12:14:18 +02:00
parent 7e30053d51
commit 9fd3ccc4b6
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,