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

Address sqlite findAll bug #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jamescqcampbell
Copy link

When used with sqlite Model.findAll returns an Array of instances.

They not recognised by Keychain as an Array in sequelize.js line 51 (as typeof record returns 'object'). The hook throws a TypeError line 52 is not called and it attempts to run the afterFind hook on the array and not the record.

Switching to Array.isArray(record) solves the issue.

When used with sqlite Model.findAll  returns an Array of instances that is not recognised by Keychain as an Array in line 51 (as typeof record returns 'object') and the hook throws a TypeError. Switching to Array.isArray(record) solves the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant