Skip to content

Commit

Permalink
naming fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
insane-22 authored May 28, 2024
1 parent 1b94253 commit 05870c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/client/unified-form/cover-tab/isbn-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function mapStateToProps(rootState:State):ISBNStateProps {
}

function mapDispatchToProps(dispatch):ISBNDispatchProps {
let gett:dispatchResultProps|null;
let autoAddedISBN:dispatchResultProps|null;
function onChange(value:string, autoISBN = false) {
const isbn10rgx = new
RegExp('^(?:ISBN(?:-10)?:?●)?(?=[0-9X]{10}$|(?=(?:[0-9]+[-●]){3})[-●0-9X]{13}$)[0-9]{1,5}[-●]?[0-9]+[-●]?[0-9]+[-●]?[0-9X]$');
Expand All @@ -78,16 +78,16 @@ function mapDispatchToProps(dispatch):ISBNDispatchProps {
}
dispatch(updateISBNType(type));
if (autoISBN && otherISBN.type) {
gett = dispatch(addOtherISBN(otherISBN.type, otherISBN.value));
autoAddedISBN = dispatch(addOtherISBN(otherISBN.type, otherISBN.value));
}
dispatch(debouncedUpdateISBNValue(value));
}
return {
onAutoISBNChange: (checked:boolean) => {
dispatch(updateAutoISBN(checked));
if(gett){
dispatch(removeIdentifierRow(gett.payload.rowId));
gett=null;
if(autoAddedISBN){
dispatch(removeIdentifierRow(autoAddedISBN.payload.rowId));
autoAddedISBN=null;
}
return;
},
Expand Down

0 comments on commit 05870c8

Please sign in to comment.