An Error occurred when I tried to save DocumentReference on Cloud Functions.
Error
Error: Cannot encode type ([object Object]) to a Firestore Value
Error: Cannot encode type ([object Object]) to a Firestore Value
at Function.encodeValue (/user_code/node_modules/pring/node_modules/@google-cloud/firestore/src/document.js:773:11)
at Function.encodeFields (/user_code/node_modules/pring/node_modules/@google-cloud/firestore/src/document.js:644:36)
at Function.fromObject (/user_code/node_modules/pring/node_modules/@google-cloud/firestore/src/document.js:202:55)
at WriteBatch.set (/user_code/node_modules/pring/node_modules/@google-cloud/firestore/src/write-batch.js:272:39)
at PringTest.Base.pack (/user_code/node_modules/pring/src/pring.js:225:27)
at PringTest.<anonymous> (/user_code/node_modules/pring/src/pring.js:268:42)
at step (/user_code/node_modules/pring/src/pring.js:32:23)
at Object.next (/user_code/node_modules/pring/src/pring.js:13:53)
at /user_code/node_modules/pring/src/pring.js:7:71
at __awaiter (/user_code/node_modules/pring/src/pring.js:3:12)
An Error occurred when I tried to save
DocumentReference
on Cloud Functions.Error
Error: Cannot encode type ([object Object]) to a Firestore Value
Code