mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Fix set load middleware function
This commit is contained in:
parent
29e25686d1
commit
dce9c3f232
@ -165,7 +165,7 @@ const mountMiddlewares = function (files, cwd) {
|
||||
loaded: false
|
||||
};
|
||||
|
||||
if (endsWith(p, 'index.js')) {
|
||||
if (endsWith(p, 'index.js') && !this.middleware[name].load) {
|
||||
// Lazy loading.
|
||||
Object.defineProperty(this.middleware[name], 'load', {
|
||||
configurable: false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user