|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
578 bytes
|
| Line | |
|---|
| 1 | export default function (pluginConfig, plugins) {
|
|---|
| 2 | if (pluginConfig === undefined) {
|
|---|
| 3 | return plugins
|
|---|
| 4 | }
|
|---|
| 5 |
|
|---|
| 6 | const pluginNames = Array.isArray(pluginConfig)
|
|---|
| 7 | ? pluginConfig
|
|---|
| 8 | : [
|
|---|
| 9 | ...new Set(
|
|---|
| 10 | plugins
|
|---|
| 11 | .filter((pluginName) => {
|
|---|
| 12 | return pluginConfig !== false && pluginConfig[pluginName] !== false
|
|---|
| 13 | })
|
|---|
| 14 | .concat(
|
|---|
| 15 | Object.keys(pluginConfig).filter((pluginName) => {
|
|---|
| 16 | return pluginConfig[pluginName] !== false
|
|---|
| 17 | })
|
|---|
| 18 | )
|
|---|
| 19 | ),
|
|---|
| 20 | ]
|
|---|
| 21 |
|
|---|
| 22 | return pluginNames
|
|---|
| 23 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.