Skip to content

Commit 2b20791

Browse files
committed
Fix export issue when autoReload is enabled
1 parent 76d6260 commit 2b20791

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

controllers/config.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,19 @@ module.exports = {
1515
* @returns {void}
1616
*/
1717
exportAll: async (ctx) => {
18+
if (strapi.config.get('autoReload')) {
19+
ctx.send({
20+
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
21+
});
22+
}
23+
1824
await strapi.plugins['config-sync'].services.main.exportAllConfig();
1925

20-
ctx.send({
21-
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
22-
});
26+
if (!strapi.config.get('autoReload')) {
27+
ctx.send({
28+
message: `Config was successfully exported to ${strapi.plugins['config-sync'].config.destination}.`
29+
});
30+
}
2331
},
2432

2533
/**

0 commit comments

Comments
 (0)