How to display a database row if no results are found in search?

Also, just to let you know, I took out this part -

 .catch((error)  **=>**  {  

// if we get here, it really is an error!
let errorMsg = err;

My reason for taking it out is that when I went to test this in preview mode it didn’t work. My thinking was it had something to do with the error codes it gave once I added the script you provided. The 2 error codes were -
Red Circle - ‘err’ is not defined
Yellow Triangle - ‘error’ is already declared in the upper scope.

I took them out just out of curiosity and nothing was changed in how it functioned.