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

Commit

Permalink
Merge pull request #115 from jakeorr/master
Browse files Browse the repository at this point in the history
pull out decoded ID for hashedFields
  • Loading branch information
JaneJeon authored Jun 5, 2021
2 parents e8ece41 + 12a2d21 commit 95e33db
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 95e33db

Please sign in to comment.