Skip to content

Commit

Permalink
handling null identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
pellicceama committed Jan 5, 2023
1 parent 99a0fdf commit 6c565ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/repo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ export async function addIdentifierToAsset(dir: string, networkCode: string, add

const assetInfoFile = JSON.parse(fs.readFileSync(assetInfoFilePath, 'utf8'));

if(assetInfoFile.identifiers[identifierKey]) {
if(!assetInfoFile.identifiers
|| Object.keys(assetInfoFile.identifiers).length === 0
|| assetInfoFile.identifiers[identifierKey]) {
return { addedIdentifier: false };
}

Expand Down

0 comments on commit 6c565ef

Please sign in to comment.