Skip to content

Commit

Permalink
fix(plugins): Default plugins to empty list to prevent NPE (spinnaker…
Browse files Browse the repository at this point in the history
…#7736)

While the default configs (halyard and non-halyard) were updated
to set plugins to an empty array, users who have a custom config
will get an NPE unless we add this defaulting here.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
ezimanyi and mergify[bot] committed Jan 2, 2020
1 parent 497a69f commit 192531a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/scripts/modules/core/src/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ SETTINGS.analytics = SETTINGS.analytics || {};
SETTINGS.providers = SETTINGS.providers || {};
SETTINGS.defaultTimeZone = SETTINGS.defaultTimeZone || 'America/Los_Angeles';
SETTINGS.dockerInsights = SETTINGS.dockerInsights || { enabled: false, url: '' };
SETTINGS.plugins = SETTINGS.plugins || [];

// A helper to make resetting settings to steady state after running tests easier
const originalSettings: ISpinnakerSettings = cloneDeep(SETTINGS);
Expand Down

0 comments on commit 192531a

Please sign in to comment.