Skip to content

Commit

Permalink
fix(ScannerModal): fix regex scope
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Jun 17, 2024
1 parent 0ff957d commit fe3ada6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/matches/Scanner/ScannerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import ScannerFeedback from "@/components/matches/Scanner/ScannerFeedback";
import { ScannedTextType, TextType } from "@/utils/types";

function determineScannedTextType(scannedText: string): ScannedTextType {
if (/^[\da-f]{12}$|^\d{8}$/.test(scannedText)) {
if (/^[\dA-Za-z]{12}$|^\d{8}$/.test(scannedText)) {
return TextType.BLID;
} else if (/^\d{13}$/.test(scannedText)) {
return TextType.ISBN;
Expand Down

0 comments on commit fe3ada6

Please sign in to comment.