Skip to content

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