@edgedev/firebase 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. package/index.ts +3 -3
  2. package/package.json +1 -1
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
- const docRef = doc(db, collectionPath, docId);
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)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/firebase",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Composables and stores for firebase",
5
5
  "main": "index.ts",
6
6
  "author": "Seth Fischer",