We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 452b0bd commit 6c48b71Copy full SHA for 6c48b71
packages/addons/sitemap/server/bootstrap.js
@@ -52,7 +52,17 @@ export default async () => {
52
strapi.cron.add({
53
generateDefaultSitemap: {
54
task: async ({ strapi }) => {
55
- getPluginService('core').createSitemap('default');
+ const id = 'default';
56
+
57
+ const config = await getPluginService('settings').getConfig();
58
+ const sitemapConfig = config.sitemaps[id];
59
60
+ // Gracefully exit if no sitemap config found
61
+ if (!sitemapConfig) {
62
+ return;
63
+ }
64
65
+ getPluginService('core').createSitemap(id);
66
},
67
options: {
68
rule: cron,
0 commit comments