Skip to content

Commit

Permalink
Merge pull request #95 from bhargavmodak/main
Browse files Browse the repository at this point in the history
fix: Correctly check for workspace existence
  • Loading branch information
bhargavmodak authored Apr 9, 2024
2 parents a7ce299 + c29ce01 commit 5a151d2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions client/src/components/workspace/SideStrip.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ export default function SideStrip({ handleSelect, selected }) {
};
const dbRef = doc(db, 'workspace', params.workspaceId);

// Create doc if it doesn't exist, else update it
const docSnap = await dbRef.get();
if (!docSnap.exists()) {
if (!dbRef.exists()) {
await setDoc(dbRef, data);
} else {
await updateDoc(dbRef, data);
Expand Down

0 comments on commit 5a151d2

Please sign in to comment.