From 8bf3ab24d5700d067d6e85d00e6683c1ba77306c Mon Sep 17 00:00:00 2001 From: Billy Zhou Date: Sun, 16 Sep 2018 00:22:56 +0800 Subject: [PATCH] Fixed issue #2233 - Boolean object set to false is not visible (fixes #2233) --- .../controllers/widget/organization.coffee | 2 +- .../app/views/widget/organization.jst.eco | 2 +- test/browser/admin_object_manager_test.rb | 52 +++++++++++++++++++ test/browser_test_helper.rb | 45 +++++++++++++--- 4 files changed, 93 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/app/controllers/widget/organization.coffee b/app/assets/javascripts/app/controllers/widget/organization.coffee index 106a444a3..37befa1f0 100644 --- a/app/assets/javascripts/app/controllers/widget/organization.coffee +++ b/app/assets/javascripts/app/controllers/widget/organization.coffee @@ -29,7 +29,7 @@ class App.WidgetOrganization extends App.Controller name = nameNew # add to show if value exists - if ( organization[name] || attributeConfig.tag is 'richtext' ) && attributeConfig.shown + if ( organization[name]? || attributeConfig.tag is 'richtext' ) && attributeConfig.shown # do not show firstname and lastname / already show via diplayName() if name isnt 'name' diff --git a/app/assets/javascripts/app/views/widget/organization.jst.eco b/app/assets/javascripts/app/views/widget/organization.jst.eco index 5935cfdc6..2b5d2daf9 100644 --- a/app/assets/javascripts/app/views/widget/organization.jst.eco +++ b/app/assets/javascripts/app/views/widget/organization.jst.eco @@ -8,7 +8,7 @@ <% for row in @organizationData: %> - <% if @organization[row.name] || row.name is 'note': %> + <% if @organization[row.name]? || row.name is 'note': %>