Skip to content

Commit 5317129

Browse files
committed
fix undefined being sent as a header
1 parent 6ffece9 commit 5317129

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

packages/basehub/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# basehub
22

3+
## 9.0.3
4+
5+
### Patch Changes
6+
7+
- fix undefined being sent as a header
8+
39
## 9.0.2
410

511
### Patch Changes

packages/basehub/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "basehub",
33
"description": "A very fast Headless CMS.",
44
"author": "JB <[email protected]>",
5-
"version": "9.0.2",
5+
"version": "9.0.3",
66
"license": "MIT",
77
"repository": "basehub-ai/basehub",
88
"bugs": "https://github.com/basehub-ai/basehub/issues",

packages/basehub/src/next/toolbar/server-toolbar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ export const ServerToolbar = async ({
155155
headers: {
156156
"content-type": "application/json",
157157
...headers,
158-
"x-basehub-ref": ref || headers["x-basehub-ref"],
159-
"x-basehub-preview-token": bshbPreviewToken,
158+
...(ref && { "x-basehub-ref": ref }),
159+
...(bshbPreviewToken && {
160+
"x-basehub-preview-token": bshbPreviewToken,
161+
}),
160162
} as HeadersInit,
161163
});
162164

playground/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# playground
22

3+
## 0.0.218
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
9+
310
## 0.0.217
411

512
### Patch Changes

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "playground",
33
"private": true,
4-
"version": "0.0.217",
4+
"version": "0.0.218",
55
"scripts": {
66
"dev": "next dev --port 3003",
77
"build": "next build",

0 commit comments

Comments
 (0)