one minor change as per PR review
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/88c36c34 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/88c36c34 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/88c36c34 Branch: refs/heads/master Commit: 88c36c34e038cb78f58d9da21f4252387c4eec30 Parents: 4b95aa5 Author: Alex Heneveld <[email protected]> Authored: Tue Oct 23 17:43:20 2018 +0100 Committer: Alex Heneveld <[email protected]> Committed: Tue Oct 23 17:43:20 2018 +0100 ---------------------------------------------------------------------- .../app/components/providers/palette-service.provider.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/88c36c34/ui-modules/blueprint-composer/app/components/providers/palette-service.provider.js ---------------------------------------------------------------------- diff --git a/ui-modules/blueprint-composer/app/components/providers/palette-service.provider.js b/ui-modules/blueprint-composer/app/components/providers/palette-service.provider.js index 7fbb4ee..8529888 100644 --- a/ui-modules/blueprint-composer/app/components/providers/palette-service.provider.js +++ b/ui-modules/blueprint-composer/app/components/providers/palette-service.provider.js @@ -45,7 +45,7 @@ export function paletteServiceProvider() { class PaletteService { constructor(sectionsToAdd) { this.sections = {}; - this.fields = ['title', 'type', 'icon']; + this.requiredFields = ['title', 'type', 'icon']; for (const [id, section] of Object.entries(sectionsToAdd)) { this.addSection(id, section); @@ -57,7 +57,7 @@ class PaletteService { throw 'Section must be an object'; } - this.fields.forEach(field => { + this.requiredFields.forEach(field => { if (!section.hasOwnProperty(field)) { throw `Section must have field "${field}" defined`; } @@ -72,4 +72,4 @@ class PaletteService { getSections() { return this.sections; } -} \ No newline at end of file +}
