This is an automated email from the ASF dual-hosted git repository. tbouron pushed a commit to branch tbouron-patch-2 in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
commit b54c3a6a22fad2279a92861f789848cd9a8b1a7c Author: Thomas Bouron <[email protected]> AuthorDate: Wed Dec 2 14:09:23 2020 +0000 Use `===` to not only check the value but type On the spec editor, if an entity has a configuration key of type `integer`, with a `defaultValue` of `0`, then the `Configuration` section displayed `(empty)` because `defaultValue == ''` is true, whereas `defaultValue === ''` is false, which is what we want --- .../app/components/spec-editor/spec-editor.template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html index 0ed851c..c09efa8 100644 --- a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html +++ b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html @@ -507,7 +507,7 @@ <div class="input-group" ng-switch-default> <span class="main-control span-for-rounded-edge"> <textarea ng-model="config[item.name]" class="form-control rounded-edge" name="{{item.name}}" id="{{item.name}}" auto-grow - placeholder="{{defined(config[item.name]) ? null : item.defaultValue=='' || item.defaultValue==null ? '(empty)' : item.defaultValue}}" + placeholder="{{defined(config[item.name]) ? null : item.defaultValue === '' || item.defaultValue === null ? '(empty)' : item.defaultValue}}" ng-focus="specEditor.recordConfigFocus(item)" on-enter="specEditor.advanceOutToFormGroupInPanel"></textarea> </span> <span class="input-group-btn dsl-wizard-button rounded-edge" ng-if="specEditor.isDslWizardButtonAllowed(item.name)">
