mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 00:23:12 +09:00
Add note about config value cast through unknown
This commit is contained in:
1 parent
c0f65e0610
commit
1f19f1bfcb
1 file changed
+3
@@ -112,6 +112,9 @@ function getPlugins(req: Request, res: Response) {
|
|||||||
let enabled = loaded && req.app.locals.controller.config.get(
|
let enabled = loaded && req.app.locals.controller.config.get(
|
||||||
`${pluginInfo.name}.load_plugin` as keyof lib.ControllerConfigFields,
|
`${pluginInfo.name}.load_plugin` as keyof lib.ControllerConfigFields,
|
||||||
) as unknown as boolean;
|
) as unknown as boolean;
|
||||||
|
// Note: Cast through unknown is needed because load_plugin is
|
||||||
|
// defined at runtime and no other fields in the controller config
|
||||||
|
// currently have the boolean type.
|
||||||
let web: { main:any, error:string|undefined } = { main: undefined, error: undefined};
|
let web: { main:any, error:string|undefined } = { main: undefined, error: undefined};
|
||||||
let devPlugins = req.app.locals.devPlugins;
|
let devPlugins = req.app.locals.devPlugins;
|
||||||
if (devPlugins && devPlugins.has(name)) {
|
if (devPlugins && devPlugins.has(name)) {
|
||||||
|
|||||||
Reference in new issue
Block a user