Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

pull out decoded ID for hashedFields #115

Merged
merged 1 commit into from
Jun 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = Model => {
this.constructor.hashedFields.forEach(field => {
const hashId = get(json, field)
const decoded = this.constructor._hashIdInstance.decode(hashId)
set(json, field, decoded)
set(json, field, decoded[0])
})

// decoding the id is a bit trickier as it can be a compound PK.
Expand Down