Javascript 获取错误:FIRESTORE(8.1.1)内部断言失败:意外状态
我正在firestore中添加聊天室名称,但在添加名称时出现此错误Javascript 获取错误:FIRESTORE(8.1.1)内部断言失败:意外状态,javascript,reactjs,firebase,Javascript,Reactjs,Firebase,我正在firestore中添加聊天室名称,但在添加名称时出现此错误 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
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 | }
这是我的源代码
const addChat = ()=>{
const chatName = prompt('type the chat name')
db.collection('chats').add({
chatName : chatName,
})
}
我犯了什么错误吗?谢谢