Skip to content

Commit

Permalink
feat(middleware): remove cast of address_parts.zip to Array
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Jan 23, 2025
1 parent b38c795 commit 89ce1a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion middleware/mapFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const PARENT_PROPS = require('../helper/placeTypes');
const ADDRESS_PROPS = [
{ name: 'unit', newName: 'unit' },
{ name: 'number', newName: 'housenumber' },
{ name: 'zip', newName: 'postalcode', transform: (value) => { return [value]; } },
{ name: 'zip', newName: 'postalcode' },
{ name: 'street', newName: 'street' }
];

Expand Down
4 changes: 2 additions & 2 deletions test/unit/middleware/mapFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports.tests.mapFields = function(test, common) {
},
unit: 'unit value',
housenumber: 'number value',
postalcode: ['zip value'],
postalcode: 'zip value',
street: 'street value'
}];

Expand Down Expand Up @@ -164,7 +164,7 @@ module.exports.tests.mapFields = function(test, common) {

unit: 'unit value',
housenumber: 'number value',
postalcode: ['zip value'],
postalcode: 'zip value',
street: 'street value',
}];

Expand Down

0 comments on commit 89ce1a8

Please sign in to comment.