Skip to content

Commit

Permalink
fix: 修复 mock 被错误关闭的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Dec 1, 2023
1 parent b86fe32 commit a34070f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion continew-admin-ui/src/utils/setup-mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
export default ({ mock, setup }: { mock?: boolean; setup: () => void }) => {
// 仅在开发环境启用 mock
// if (mock !== false && debug) setup();

// 在生产环境也启用 mock
if (mock) setup();
if (mock !== false) setup();
};

export const successResponseWrap = (data: unknown) => {
Expand Down

0 comments on commit a34070f

Please sign in to comment.