mirror of
https://github.com/movie-web/extension.git
synced 2025-09-13 09:03:25 +00:00
return body if body type is undefined
This commit is contained in:
@@ -16,7 +16,7 @@ export interface Request extends BaseRequest {
|
||||
readHeaders?: Record<string, string>;
|
||||
url: string;
|
||||
body?: any;
|
||||
bodyType: 'string' | 'FormData' | 'URLSearchParams' | 'object';
|
||||
bodyType?: 'string' | 'FormData' | 'URLSearchParams' | 'object';
|
||||
}
|
||||
|
||||
type Response<T> = BaseResponse<{
|
||||
@@ -49,7 +49,7 @@ const mapBodyToFetchBody = (body: Request['body'], bodyType: Request['bodyType']
|
||||
if (bodyType === 'string') {
|
||||
return body;
|
||||
}
|
||||
return undefined;
|
||||
return body;
|
||||
};
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler<Request, Response<any>> = async (req, res) => {
|
||||
|
Reference in New Issue
Block a user