diff --git a/convert/convertConfig.ts b/convert/convertConfig.ts index f1488375b..39add2f8c 100644 --- a/convert/convertConfig.ts +++ b/convert/convertConfig.ts @@ -1125,14 +1125,27 @@ function filterFeaturesNotReady(data: ScriptureConfig | DictionaryConfig) { data.mainFeatures['user-accounts'] = false; // Two pane and Verse-By-Verse are not done - if (data.layouts) { - for (const layout of data.layouts) { - if (layout.mode === 'two' || layout.mode === 'verse-by-verse') { - layout.enabled = false; + if (isScriptureConfig(data)) { + // Two pane and Verse-By-Verse are not done + if (data.layouts) { + for (const layout of data.layouts) { + if (layout.mode === 'two' || layout.mode === 'verse-by-verse') { + layout.enabled = false; + } } + + } + if (data.bookCollections) { + // only allow single pane book collections + // in SAB 12.1, the feature changed names from bc-allow-single-pane to bc-layout-allow-single-pane + data.bookCollections = data.bookCollections.filter((collection) => { + const allowSinglePane = + collection?.features['bc-allow-single-pane'] ?? + collection?.features['bc-layout-allow-single-pane']; + return allowSinglePane !== false; + }); } } - // Verse on image is not done data.mainFeatures['text-on-image'] = false; @@ -1148,17 +1161,6 @@ function filterFeaturesNotReady(data: ScriptureConfig | DictionaryConfig) { data.mainFeatures['settings-daily-reminder-time'] = false; data.mainFeatures['settings-keep-screen-on'] = false; data.mainFeatures['settings-share-usage-data'] = false; - - if (data.bookCollections) { - // only allow single pane book collections - // in SAB 12.1, the feature changed names from bc-allow-single-pane to bc-layout-allow-single-pane - data.bookCollections = data.bookCollections.filter((collection) => { - const allowSinglePane = - collection?.features['bc-allow-single-pane'] ?? - collection?.features['bc-layout-allow-single-pane']; - return allowSinglePane !== false; - }); - } return data; }