Skip to content

Commit

Permalink
Merge pull request #30 from modos189/fix-status
Browse files Browse the repository at this point in the history
Change the plugin status value from `undefined` to `"off"` in some cases where no value is specified
  • Loading branch information
modos189 authored Jan 27, 2024
2 parents 56f1a0c + 0492bfd commit 2198273
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,14 +595,14 @@ export class Worker {

// Build local plugins
Object.keys(plugins_local).forEach((plugin_uid) => {
data[plugin_uid]['status'] = plugins_local[plugin_uid]['status'];
data[plugin_uid]['status'] = plugins_local[plugin_uid]['status'] || 'off';
});

// Build External plugins
if (Object.keys(plugins_user).length) {
Object.keys(plugins_user).forEach((plugin_uid) => {
if (plugin_uid in data) {
data[plugin_uid]['status'] = plugins_user[plugin_uid]['status'];
data[plugin_uid]['status'] = plugins_user[plugin_uid]['status'] || 'off';
data[plugin_uid]['code'] = plugins_user[plugin_uid]['code'];
data[plugin_uid]['user'] = true;
data[plugin_uid]['override'] = true;
Expand Down

0 comments on commit 2198273

Please sign in to comment.