summaryrefslogtreecommitdiffstats
path: root/app/ContactsView.qml
diff options
context:
space:
mode:
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-09-16 11:04:24 +0800
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>2019-09-16 11:04:24 +0800
commit6318feef026436ada12a9c44a0279d198ee3ae8c (patch)
tree10903f7ac2588e7d17d37ca39e73264453d041bc /app/ContactsView.qml
parent049ff63ded31c90479e3aac10aa5624b2374bae6 (diff)
Message: == and != may perform type coercion, use === or !== to avoid it. Description: The non-strict equality comparison is allowed to convert its arguments to a common type. That can lead to unexpected results such as ' \t\r\n' == 0 being true. Use the strict equality operators === and !== and be explicit about conversions you require. Bug-AGL: SPEC-2814 Change-Id: I94130d38621a8775593edab63d409654dd758ef2 Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Diffstat (limited to 'app/ContactsView.qml')
-rw-r--r--app/ContactsView.qml10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/ContactsView.qml b/app/ContactsView.qml
index 5c2c327..66f2199 100644
--- a/app/ContactsView.qml
+++ b/app/ContactsView.qml
@@ -26,15 +26,15 @@ Item {
id: root
function display_type(type) {
- if (type == PhoneNumber.CELL) {
+ if (type === PhoneNumber.CELL) {
return "M"
- } else if (type == PhoneNumber.WORK) {
+ } else if (type === PhoneNumber.WORK) {
return "W"
- } else if (type == PhoneNumber.HOME) {
+ } else if (type === PhoneNumber.HOME) {
return "H"
- } else if (type == PhoneNumber.FAX) {
+ } else if (type === PhoneNumber.FAX) {
return "F"
- } else if (type == PhoneNumber.VOICE) {
+ } else if (type === PhoneNumber.VOICE) {
return "V"
} else {
return "O"