Skip to content

Commit

Permalink
Update findMatch signature and delete old comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
mapomatic committed Jul 14, 2024
1 parent e1a50ae commit c4c1834
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WME-Place-Harmonizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1460,18 +1460,18 @@
* @param {string} country The country code
* @param {string[]} categories The venue's current category array
* @param {venue} venue The venue object
* @param {boolean} [closedChainsOnly] Use true if only finding closed chains, i.e. when doing map highlights
* @returns
*/
static findMatch(name, state2L, region3L, country, categories, venue, closeChainsOnly) {
static findMatch(name, state2L, region3L, country, categories, venue, closedChainsOnly) {
if (country !== PNH_DATA.USA.countryCode && country !== PNH_DATA.CAN.countryCode) {
//WazeWrap.Alerts.info(SCRIPT_NAME, 'No PNH data exists for this country.');
return ['NoMatch'];
}
if (venue.isParkingLot()) {
return ['NoMatch'];
}
/** @type {PnhEntry[]} */
const pnhData = closeChainsOnly ? PNH_DATA[country].closedChains : PNH_DATA[country].pnh;
const pnhData = closedChainsOnly ? PNH_DATA[country].closedChains : PNH_DATA[country].pnh;
const matchPNHRegionData = []; // array of matched data with regional approval
const pnhOrderNum = [];
const pnhNameTemp = [];
Expand Down Expand Up @@ -7148,7 +7148,6 @@ id="WMEPH-zipAltNameAdd"autocomplete="off" style="font-size:0.85em;width:65px;pa
}
} else {
args.pnhMatch = Pnh.findMatch(args.nameBase, args.state2L, args.regionCode, args.countryCode, args.categories, venue, true);
//args.pnhMatch = ['Highlight'];
}

args.pnhNameRegMatch = args.pnhMatch?.length
Expand Down Expand Up @@ -10383,6 +10382,7 @@ id="WMEPH-zipAltNameAdd"autocomplete="off" style="font-size:0.85em;width:65px;pa
if (W.loginManager.user.getUsername() === 'MapOMatic') {
// For debugging purposes. May be removed when no longer needed.
unsafeWindow.PNH_DATA = PNH_DATA;
unsafeWindow.WMEPH_FLAG = Flag;
}
}

Expand Down

0 comments on commit c4c1834

Please sign in to comment.