Skip to content

Commit

Permalink
chore: release v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vben-admin committed Mar 8, 2021
1 parent 134d881 commit 3389e64
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/createMockServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ export async function requestMiddle(opt: ViteMockOptions) {
const urlMatch = match(url, { decode: decodeURIComponent });

let query = queryParams.query;

if (reqUrl) {
query = (urlMatch(reqUrl) as any).params;
if (reqUrl && JSON.stringify(query) == '{}') {
query = (urlMatch(reqUrl) as any).params || {};
}

const body = (await parseJson(req)) as Record<string, any>;
Expand Down

0 comments on commit 3389e64

Please sign in to comment.