dijs / infobox-parser

Parse Wikipedia Infoboxes
40 stars 18 forks source link

CamelCase Error: str.trim is not a function #6

Closed goferito closed 7 years ago

goferito commented 7 years ago

I'm getting this error while parsing Islamabad:

Shit happened retrieving Islamabad population data: TypeError: str.trim is not a function
    at module.exports (/home/goferito/cms/node_modules/camelcase/index.js:39:13)
    at /home/goferito/cms/node_modules/infobox-parser/build/bundle.min.js:1:4378
    at Array.reduce (native)
    at transformProperties (/home/goferito/cms/node_modules/infobox-parser/build/bundle.min.js:1:4204)
    at index (/home/goferito/cms/node_modules/infobox-parser/build/bundle.min.js:1:9951)
    at /home/goferito/cms/node_modules/wikijs/dist/page.js:1:1418
    at process._tickCallback (internal/process/next_tick.js:109:7)
goferito commented 7 years ago

I'm checking this. Maybe the error comes already from wikijs. The infobox is parsed fine when copied from wikipedia.

Anyway, I think there is also some type check before using camel case module.