From 942fc83bfe394f1fbd465603ead83beaab319cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Gorej?= Date: Tue, 7 May 2024 14:25:16 +0200 Subject: [PATCH] fix(system): allow wrapping components both from presets and plugins (#869) Refs https://github.com/swagger-api/swagger-ui/pull/9919 --- src/system/helpers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/system/helpers.js b/src/system/helpers.js index ffbbc5a9..ae8c9cc4 100644 --- a/src/system/helpers.js +++ b/src/system/helpers.js @@ -104,7 +104,9 @@ export const combinePlugins = (plugins, system) => { if (isArray(plugins)) { // eslint-disable-next-line no-unused-vars - return plugins.map((plugin) => combinePlugins(plugin, system)).reduce(systemExtend, {}); + return plugins + .map((plugin) => combinePlugins(plugin, system)) + .reduce(systemExtend, { components: { ...system.getComponents() } }); } return {};