fix(config) avoid using legacy config options

If the new ones are specified, use them.
This commit is contained in:
Saúl Ibarra Corretgé 2021-04-22 10:55:03 +02:00 committed by Saúl Ibarra Corretgé
parent 527d022d63
commit 433e212e20
1 changed files with 2 additions and 1 deletions

View File

@ -224,7 +224,8 @@ function _translateLegacyConfig(oldValue: Object) {
} }
}); });
if (typeof interfaceConfig === 'object' && Array.isArray(interfaceConfig.TOOLBAR_BUTTONS)) { if (!Array.isArray(oldValue.toolbarButtons)
&& typeof interfaceConfig === 'object' && Array.isArray(interfaceConfig.TOOLBAR_BUTTONS)) {
newValue.toolbarButtons = interfaceConfig.TOOLBAR_BUTTONS; newValue.toolbarButtons = interfaceConfig.TOOLBAR_BUTTONS;
} }