Skip to content

Commit

Permalink
[templates/nextjs, templates/nextjs-sxa]: The condition DISBLE_SSG_F…
Browse files Browse the repository at this point in the history
…ETCH has been fixed
  • Loading branch information
Ruslan Matkovskyi committed Jan 16, 2025
1 parent e73a9e7 commit 253e9ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
});
let resultErrorPages: ErrorPages | null = null;

if (!process.env.DISABLE_SSG_FETCH) {
if (process.env.DISABLE_SSG_FETCH !== 'true') {
try {
resultErrorPages = await errorPagesService.fetchErrorPages();
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
});
let resultErrorPages: ErrorPages | null = null;

if (!process.env.DISABLE_SSG_FETCH) {
if (process.env.DISABLE_SSG_FETCH !== 'true') {
try {
resultErrorPages = await errorPagesService.fetchErrorPages();
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const getStaticPaths: GetStaticPaths = async (context) => {
let paths: StaticPath[] = [];
let fallback: boolean | 'blocking' = 'blocking';

if (process.env.NODE_ENV !== 'development' && !process.env.DISABLE_SSG_FETCH) {
if (process.env.NODE_ENV !== 'development' && process.env.DISABLE_SSG_FETCH !== 'true') {
try {
// Note: Next.js runs export in production mode
paths = await sitemapFetcher.fetch(context);
Expand Down

0 comments on commit 253e9ea

Please sign in to comment.