Skip to content

Commit

Permalink
fix(onelook): extract strings from arrays
Browse files Browse the repository at this point in the history
parsed object has single strings in arrays

Close #4 Onelook resource links option broken
  • Loading branch information
drawnepicenter committed Aug 11, 2016
1 parent 1f5ea44 commit 9e504d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cmds/onelook.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ exports.handler = (argv) => {
themes.label(theme, 'down', 'Resources')
for (let i = 0; i <= resources.length - 1; i++) {
const item = resources[i]
const res = item.OLResName.replace(/\n/g, '')
const link = item.OLResLink.replace(/\n/g, '')
const res = tools.arrToStr(item.OLResName).replace(/\n/g, '')
const link = tools.arrToStr(item.OLResLink).replace(/\n/g, '')
const home = tools.arrToStr(item.OLResHomeLink).replace(/\n/g, '')
themes.label(theme, 'right', res, link)
tofile[[`res${i}`]] = res
tofile[[`link${i}`]] = link
tofile[[`home${i}`]] = home
}
}
if (argv.o) tools.outFile(argv.o, argv.f, tofile)
Expand Down

0 comments on commit 9e504d1

Please sign in to comment.