Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(loader): always log loader error at server side #557

Merged
merged 2 commits into from
Sep 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: revert loader.ts
  • Loading branch information
Repraance committed Sep 4, 2023
commit a9a16860180a9e84feb5a12c5872a488dae462c2
6 changes: 1 addition & 5 deletions packages/platform-shared/src/shared/loader/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@ export async function runLoaders(
res = createJson(value);
}
} catch (err) {
const showError =
(typeof window === 'undefined' ||
process.env.NODE_ENV === 'development') &&
!isResponse(err);
if (showError) {
if (process.env.NODE_ENV === 'development' && !isResponse(err)) {
console.error(
`error occurs in loader function of route "${match.route.path}"`
);
Expand Down
Loading