Merge pull request #3221 from frewsxcv/frewsxcv-240FC0C7-86BF-40B6-BCF7-DEC15AB7E4F8

Migrate `tryToReplaceWithLocalTaxon` to TypeScript.
This commit is contained in:
Seth Peterson
2025-11-14 09:17:55 -06:00
committed by GitHub

View File

@@ -1,4 +1,10 @@
const tryToReplaceWithLocalTaxon = ( localTaxa, suggestion ) => {
import Taxon from "realmModels/Taxon";
import type { RealmTaxon } from "realmModels/types";
const tryToReplaceWithLocalTaxon = (
localTaxa: ( Taxon & RealmTaxon )[],
suggestion: { taxon: { id: number } }
) => {
const localTaxon = localTaxa.find( local => local.id === suggestion.taxon.id );
if ( localTaxon ) {