fix: admin/plugins: Warning in console

Massimo Melina committed Mar 26, 2026 at 20:13 UTC d6bbae919164594c8152729b65be98be466e68fd
1 file changed +3 -2
admin/src/pluginOptions.ts
+3 -2
@@ -95,8 +95,9 @@ function makeFields(config: any, values: any) {
95 let { type, defaultValue, frontend, showIf, ...rest } = o
96 try {
97 rest.getError = evalWrapper(rest.getError)
98 - if (typeof showIf === 'string') // compile once
99 - rest.showIf = showIf = evalWrapper(showIf) // eval is normally considered a threat, but this code is coming from a plugin that's already running on your server, so you already decided to trust it. Here it will run in your browser, and inside the page that administrating the same server.
98 + if (typeof showIf === 'string')
99 + o.showIf = // compile once
100 + showIf = evalWrapper(showIf) // eval is normally considered a threat, but this code is coming from a plugin that's already running on your server, so you already decided to trust it. Here it will run in your browser, and inside the page that administrating the same server.
101 if (showIf && !showIf(values))
102 return
103 }