Skip to content

Commit

Permalink
Merge pull request #810 from eisbuk/fix/copy-paste-bug
Browse files Browse the repository at this point in the history
Some copy/paste related fixes:
  • Loading branch information
silviot authored Sep 11, 2023
2 parents 393ac53 + 944df5a commit 04def4b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflow.templates/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- name: Publish to Chromatic
uses: chromaui/action@v1
if: steps.has_secret.outputs.HAS_SECRETS
#! We expect this to fail with `Command failed with ENOENT: pnpm --version`
continue-on-error: true
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMAUI_PROJECT_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- name: Publish to Chromatic
uses: chromaui/action@v1
if: steps.has_secret.outputs.HAS_SECRETS
continue-on-error: true
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMAUI_PROJECT_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vitest-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
- 5
- 6
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 1
- uses: actions/setup-node@v2
with:
node-version: "18"
- name: Cache node modules and firebase emulators
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.rush
Expand Down
13 changes: 6 additions & 7 deletions packages/client/src/utils/firestore/compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ export const doc = (
return match(node, {
[FirestoreEnv.Client]: ({ instance }) =>
FirestoreDocVariant.client({
// Even though 'doc' (aliased as 'clientDoc' here) works on both firestore and collection instanceerences,
// Even though 'doc' (aliased as 'clientDoc' here) works on both firestore and collection references,
// it doesn't work well on unions because of slightly different type overloads, hence the typecast.
instance: clientDoc(
instance as ClientFirestore,
pathSegments.join("/")
),
instance: docPath.length
? clientDoc(instance as ClientCollectionReference, docPath)
: clientDoc(instance as ClientCollectionReference),
}),
[FirestoreEnv.Server]: ({ instance }) =>
FirestoreDocVariant.server({
Expand Down Expand Up @@ -235,7 +234,7 @@ export const writeBatch = (db: FirestoreVariant) =>
}
return batch.set(doc.instance, data);
},
commit: batch.commit,
commit: batch.commit.bind(batch),
};
},
[FirestoreEnv.Server]: ({ instance }) => {
Expand All @@ -248,7 +247,7 @@ export const writeBatch = (db: FirestoreVariant) =>
}
return batch.set(doc.instance, data);
},
commit: batch.commit,
commit: batch.commit.bind(batch),
};
},
});
Expand Down

0 comments on commit 04def4b

Please sign in to comment.