0
我有我沒有找到太多的信息有問題,我甚至看this但我無法找到此異常的解決方案:火力地堡/陣營原住民 - 斷言失敗
斷言失敗:opt_onRejected應該是一個功能。你是否將opt_context作爲第二個參數而不是第三個參數?
這裏是我的功能會拋出異常:
const {currentUser} = firebase.auth()
const credential = firebase.auth.EmailAuthProvider.credential(
currentUser.email,
password)
return (dispatch) => {
currentUser.reauthenticate(credential) // 1. Re-authenticate
.then(
console.log("RE-AUTH"),
currentUser.updateEmail(strEmail) // 2. Update email
.then(
console.log("MAIL UPDATE"),
firebase.database().ref(`users/${currentUser.uid}/`) // 3. Update profile email
.update({email})
.then(console.log("PROFILE UPDATE"))
.catch(error => console.log(error))
)
.catch(error => console.log(error))
)
.catch(error => console.log(error))
}
它的工作原理,因爲它改變了電子郵件地址,但除了顯示...