Skip to content

Commit

Permalink
rm argument from isUnfamiliarPatronType
Browse files Browse the repository at this point in the history
  • Loading branch information
charmingduchess committed Dec 19, 2024
1 parent 0416945 commit 307d70b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/available_delivery_location_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AvailableDeliveryLocationTypes {

return this._getPatronTypeOf(patronID)
.then((patronType) => {
if (this._isUnfamiliarPatronType(nyplCore.patronTypes(), patronType)) {
if (this._isUnfamiliarPatronType(patronType)) {
return
}
const patronTypeData = nyplCore.patronTypes()[patronType]
Expand Down Expand Up @@ -38,8 +38,8 @@ class AvailableDeliveryLocationTypes {
})
}

static _isUnfamiliarPatronType (patronTypes, patronType) {
if (!patronTypes[patronType]) {
static _isUnfamiliarPatronType (patronType) {
if (!nyplCore.patronTypes()[patronType]) {
logger.info(`Found the Patron Type: ${patronType} is not recognizable.`)
return true
} else {
Expand Down
3 changes: 1 addition & 2 deletions test/available_delivery_location_types.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const fixtures = require('./fixtures')
const AvailableDeliveryLocationTypes = require('../lib/available_delivery_location_types.js')

describe('AvailableDeliveryLocationTypes', function () {
const AvailableDeliveryLocationTypes = require('../lib/available_delivery_location_types.js')

before(function () {
// Reroute these (and only these) api paths to local fixtures:
fixtures.enableDataApiFixtures({
Expand Down

0 comments on commit 307d70b

Please sign in to comment.