Skip to content

Commit

Permalink
Fix autofilling ISINs with letters (#1273)
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin A. Ruder <[email protected]>
  • Loading branch information
marvinruder authored May 10, 2024
1 parent e2536f1 commit 105699d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const YahooStockStubAutocomplete = (props: YahooStockStubAutocompleteProps): JSX
handleSelect();
const stockStubWithISIN: YahooStockStub & { isin?: Stock["isin"] } = { ...value };
if (
queryInputValue.toUpperCase().match(/[A-Z]{2}[0-9]{10}/) &&
queryInputValue.toUpperCase().match(/[A-Z]{2}[A-Z0-9]{10}/) &&
isCountry(queryInputValue.substring(0, 2).toUpperCase())
)
stockStubWithISIN.isin = queryInputValue;
Expand Down

0 comments on commit 105699d

Please sign in to comment.