Skip to content

Commit

Permalink
Fixed the issues with importing USFM and auto deleting the selected s…
Browse files Browse the repository at this point in the history
…cope
  • Loading branch information
vipinpaul committed Nov 13, 2024
1 parent e1b5446 commit 3ef3e16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion renderer/src/core/burrito/createAudioSB.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const createAudioSB = (
json.copyright.licenses[0].ingredient = 'license.md';
}
selectedScope.forEach((scope) => {
json.type.flavorType.currentScope[scope] = [];
json.type.flavorType.currentScope[scope] = json.type.flavorType.currentScope[scope] || [];
localizedNames[scope] = json.localizedNames[scope];
});
json.localizedNames = localizedNames;
Expand Down
3 changes: 2 additions & 1 deletion renderer/src/core/projects/saveProjetcsMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const saveProjectsMeta = async (projectMetaObj) => {
), JSON.stringify(burritoFile));

// then maybe make a SB usfm
if (type === 'audio') {
if (type === 'Audio') {
// Adding text USFM to audio project
if ((projectMetaObj.importedFiles).length !== 0) {
const newScope = [];
Expand Down Expand Up @@ -229,6 +229,7 @@ export const saveProjectsMeta = async (projectMetaObj) => {
await fs.writeFileSync(path.join(
projectDir,
`${projectMetaObj.newProjectFields.projectName}_${id}`,
'text-1',
'metadata.json',
), JSON.stringify(burrito));
});
Expand Down

0 comments on commit 3ef3e16

Please sign in to comment.