fix themes v3 not loading
This commit is contained in:
parent
9c7ff2ab61
commit
a1822a5910
3 changed files with 8 additions and 3 deletions
|
|
@ -71,6 +71,7 @@ export const promisedRequest = async ({
|
|||
url,
|
||||
payload,
|
||||
formData,
|
||||
forceContentType,
|
||||
cache,
|
||||
credentials,
|
||||
headers = {},
|
||||
|
|
@ -79,7 +80,7 @@ export const promisedRequest = async ({
|
|||
method,
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
Accept: forceContentType ?? 'application/json',
|
||||
...headers,
|
||||
},
|
||||
}
|
||||
|
|
@ -114,7 +115,7 @@ export const promisedRequest = async ({
|
|||
)
|
||||
if (contentLength === 0) return null
|
||||
|
||||
switch (contentType) {
|
||||
switch (forceContentType ?? contentType) {
|
||||
case 'text/plain':
|
||||
return await response.text()
|
||||
case 'application/json':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue