Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when no type fuzzy matches returned #35

Open
dills122 opened this issue Jun 3, 2019 · 0 comments
Open

Error when no type fuzzy matches returned #35

dills122 opened this issue Jun 3, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@dills122
Copy link
Owner

dills122 commented Jun 3, 2019

This error is due to the typeMatches array being empty and trying to access the inner array element that doesn't exist. Need to add check for any matches returned before trying to access the matches.

Image used
E:\GitHub\mtg-card-analyzer\src\test-images\TranquilThicket.jpg

Needs to

Error

TypeError: this.matches.typeMatches[0] is not iterable
    at SingleProcessor._processOutputFile (E:\GitHub\mtg-card-analyzer\src\processor\processor.js:159:60)
    at SingleProcessor.wrapper [as _processOutputFile] (E:\GitHub\mtg-card-analyzer\node_modules\lodash\lodash.js:4935:19)
    at SingleProcessor.generateOutput (E:\GitHub\mtg-card-analyzer\src\processor\processor.js:76:10)
    at SingleProcessor.wrapper [as generateOutput] (E:\GitHub\mtg-card-analyzer\node_modules\lodash\lodash.js:4935:19)
    at processor.execute (E:\GitHub\mtg-card-analyzer\index.js:28:39)
    at _processCard (E:\GitHub\mtg-card-analyzer\src\processor\processor.js:46:16)
    at CreateDirectory.then.then.then.then (E:\GitHub\mtg-card-analyzer\src\processor\processor.js:67:16)
@dills122 dills122 added the bug Something isn't working label Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant