fix existing publish name check for edit mode

This commit is contained in:
Akinwale Ariwodola 2020-01-22 02:05:50 +01:00
parent 467272d5c8
commit 9f32363a09

View file

@ -401,7 +401,7 @@ class PublishPage extends React.PureComponent {
if (!isNameValid(name, false)) {
notify({ message: __('Your content address contains invalid characters.'), isError: true });
return;
} else if (myClaims && myClaims.length > 0) {
} else if (!editMode && myClaims && myClaims.length > 0) {
if (myClaims.some(claim => claim.name.toLowerCase() === name.trim().toLowerCase())) {
notify({
message: __('You have already published to the specified content address. Please enter a new address.'),