getting errror Error: FIRESTORE (8.1.1) INTERNAL ASSERTION FAILED: Unexpected state

Viewed 450

I working on adding the chatname in firestore but I'm getting this error on adding the name

index.esm.js:204 Uncaught Error: FIRESTORE (8.1.1) INTERNAL ASSERTION FAILED: Unexpected state
 24 | const addChat = ()=>{
 25 |     const chatName = prompt('type the chat name')
 26 | 
> 27 |     db.collection('chats').add({
  28 |     ^    chatName : chatName,
 29 |     })
 30 | }

this is my source code

     const addChat = ()=>{
     const chatName = prompt('type the chat name')

     db.collection('chats').add({
        chatName : chatName,
    })
 } 

Did I make any mistake? thanks

0 Answers
Related