fix: plugins: clearing of badApi is not streamed correctly
Massimo Melina committed
May 14, 2022 at 01:57 UTC
edb4851894e232ec37415fc7a8f37040de91abf2
1 file changed
+2
-1
server/src/api.plugins.ts
+2
-1
@@ -33,7 +33,8 @@ const apis: ApiHandlers = {
33
})
34
35
function serialize(p: Readonly<Plugin> | AvailablePlugin) {
36
- return Object.assign('getData' in p ? p.getData() : p, { started: null }, _.pick(p, ['id','started']))
36
+ return _.defaults('getData' in p ? Object.assign(_.pick(p, ['id','started']), p.getData()) : p,
37
+ { started: null, badApi: null }) // nulls should be used to be sure to overwrite previous values,
38
}
39
},
40