Skip to content

Commit 10cb07d

Browse files
committed
Fix middleware registration for auto parse
1 parent a934dfc commit 10cb07d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/bootstrap.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ module.exports = async ({ strapi }) => {
8686
const autoParseJSON = pluginConfig.api?.autoParseJSON !== false; // Default: true
8787

8888
if (autoParseJSON) {
89-
strapi.server.use(strapi.plugin('magic-editor-x').middleware('parse-editor-fields')());
89+
const parseMiddleware = strapi.plugin('magic-editor-x').middleware('parse-editor-fields');
90+
strapi.server.use(parseMiddleware({}, { strapi }));
9091
strapi.log.info('[Magic Editor X] [SUCCESS] Auto-parse middleware registered (api.autoParseJSON: true)');
9192
} else {
9293
strapi.log.info('[Magic Editor X] [INFO] Auto-parse middleware disabled (api.autoParseJSON: false)');

0 commit comments

Comments
 (0)