Skip to content

Commit

Permalink
Merge branch 'master' into import-nand-lal
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed Jun 20, 2019
2 parents 6b899db + f265bde commit 612dde2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ const main = async () => {
// Map sources to original shabad id
const sourceMap = lines.reduce( ( sourceMap, line ) => ( {
...sourceMap,
[ line[ shabadId ] ]: sources.find( source => source === line[ source ] ) || -1,
[ line[ shabadId ] ]: (
newSourceId
+ sources.findIndex( sourceName => sourceName === line[ source ] )
),
} ), {} )

// Generate sources
Expand Down

0 comments on commit 612dde2

Please sign in to comment.