Skip to content

Commit 144dec8

Browse files
committed
feat(sandbox): reset sandbox file
1 parent fe5f8cb commit 144dec8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/field-plugin/helpers/vite/src/sandbox.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as querystring from 'querystring'
2-
import { bold, red } from './utils/text'
2+
import { bold } from './utils/text'
33
import { arrows } from './utils/arrows'
44
import { load, manifestExists, MANIFEST_FILE_NAME } from './manifest'
55
import type { Manifest } from './manifest'
@@ -16,11 +16,11 @@ export const buildQueryString = (params: SandboxQueryParams) => {
1616
url: params.url,
1717
}
1818

19-
if (params.manifest === null) {
20-
return querystring.stringify(queryParams)
19+
if (params.manifest !== null) {
20+
queryParams.manifest = JSON.stringify(params.manifest)
2121
}
2222

23-
queryParams.manifest = JSON.stringify(params.manifest)
23+
return querystring.stringify(queryParams)
2424
}
2525

2626
export const generateSandboxUrl = (fieldPluginUrl: string) => {
@@ -58,4 +58,4 @@ const displayManifestChecking = () => {
5858
}
5959

6060
const displayManifestErrorLoading = (err: Error) =>
61-
console.log(`${arrows.red} ${red(`${err.message}`)}`)
61+
console.log(`${arrows.red} ${bold(`${err.message}`)}`)

0 commit comments

Comments
 (0)