@edgedev/firebase 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ import * as edgeFirebase from "@edgedev/firebase";
|
|
|
23
23
|
export { edgeFirebase };
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Also
|
|
26
|
+
Also if on Nuxt 3 - SSR must be disabled, update the nuxt.config.ts file:
|
|
27
27
|
```javascript
|
|
28
28
|
export default defineNuxtConfig({ ssr: false });
|
|
29
29
|
```
|
package/index.ts
CHANGED
|
@@ -20,7 +20,8 @@ import {
|
|
|
20
20
|
limit,
|
|
21
21
|
Query,
|
|
22
22
|
startAfter,
|
|
23
|
-
DocumentData
|
|
23
|
+
DocumentData,
|
|
24
|
+
setDoc
|
|
24
25
|
} from "firebase/firestore";
|
|
25
26
|
|
|
26
27
|
import {
|
|
@@ -417,8 +418,7 @@ export const storeDoc = async (
|
|
|
417
418
|
if (Object.prototype.hasOwnProperty.call(data, collectionPath)) {
|
|
418
419
|
data[collectionPath][docId] = cloneItem;
|
|
419
420
|
}
|
|
420
|
-
|
|
421
|
-
updateDoc(docRef, cloneItem);
|
|
421
|
+
setDoc(doc(db, collectionPath, docId), cloneItem);
|
|
422
422
|
} else {
|
|
423
423
|
const docRef = await addDoc(collection(db, collectionPath), cloneItem);
|
|
424
424
|
if (Object.prototype.hasOwnProperty.call(data, collectionPath)) {
|