Fix "linked-comment not found" msg not appearing
## Issue 6914 "Linked comment not found" message is gone ## Notes Commentron updated the message, so the string comparison failed.
This commit is contained in:
parent
90c469454a
commit
ebfd648a88
1 changed files with 2 additions and 1 deletions
|
@ -160,7 +160,8 @@ export function doCommentById(commentId: string, toastIfNotFound: boolean = true
|
|||
return result;
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.message === 'sql: no rows in result set' && toastIfNotFound) {
|
||||
const ID_NOT_FOUND_REGEX = /^comment for id (.*) could not be found$/;
|
||||
if (ID_NOT_FOUND_REGEX.test(error.message) && toastIfNotFound) {
|
||||
dispatch(
|
||||
doToast({
|
||||
isError: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue