You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by tb...@apache.org on 2020/12/02 14:09:31 UTC

[brooklyn-ui] branch tbouron-patch-2 created (now b54c3a6)

This is an automated email from the ASF dual-hosted git repository.

tbouron pushed a change to branch tbouron-patch-2
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git.


      at b54c3a6  Use `===` to not only check the value but type

This branch includes the following new commits:

     new b54c3a6  Use `===` to not only check the value but type

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[brooklyn-ui] 01/01: Use `===` to not only check the value but type

Posted by tb...@apache.org.
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 <th...@cloudsoftcorp.com>
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)">