Description
I've added strapi-server.js in src/extensions/menus/
// ./src/extensions/menus/strapi-server.js`
"use strict";
module.exports = (plugin) => {
// Get current MenuItem
attributes.
const defaultAttrs = plugin.contentTypes["'menu-item'"].schema.attributes;
// Define custom attributes for MenuItem
the same way they would be defined
// on any other schema.
const customAttrs = {
short_description: {
type: "string",
},
};
// Extend the MenuItem
content type with custom attributes.
plugin.contentTypes["'menu-item'"].schema.attributes = {
...defaultAttrs,
...customAttrs,
};
return plugin;
};
after this when I run -> npm run develop strapi I get this error
TypeError: Cannot read properties of undefined (reading 'schema') ││ at module.exports (/Users..../../../../src ││ /extensions/menus/strapi-server.js:6:58) ││ at applyUserExtension