Skip to content

Commit a0b43f3

Browse files
authored
Merge pull request #38 from boazpoolman/feature/fix-import-on-bootstrap
fix: Code order in bootstrap function
2 parents 05f037c + c71531e commit a0b43f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

server/bootstrap.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ const defaultTypes = require('./config/types');
1616
*/
1717

1818
module.exports = async () => {
19-
// Import on bootstrap.
20-
if (strapi.config.get('plugin.config-sync.importOnBootstrap')) {
21-
if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) {
22-
await strapi.plugin('config-sync').service('main').importAllConfig();
23-
}
24-
}
25-
2619
// Register config types.
2720
const registerTypes = () => {
2821
const types = {};
@@ -43,6 +36,13 @@ module.exports = async () => {
4336
};
4437
strapi.plugin('config-sync').types = registerTypes();
4538

39+
// Import on bootstrap.
40+
if (strapi.config.get('plugin.config-sync.importOnBootstrap')) {
41+
if (fs.existsSync(strapi.config.get('plugin.config-sync.syncDir'))) {
42+
await strapi.plugin('config-sync').service('main').importAllConfig();
43+
}
44+
}
45+
4646
// Register permission actions.
4747
const actions = [
4848
{

0 commit comments

Comments
 (0)