fix(Binding.qml): Remove qml M126 warning 74/22474/1 8.99.1 8.99.2 8.99.3 8.99.4 icefish/8.99.1 icefish/8.99.2 icefish/8.99.3 icefish/8.99.4 icefish_8.99.1 icefish_8.99.2 icefish_8.99.3 icefish_8.99.4
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>
Sat, 21 Sep 2019 06:05:30 +0000 (14:05 +0800)
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>
Sat, 21 Sep 2019 06:05:30 +0000 (14:05 +0800)
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: If91ecbc6a1b92c63f7fcdbc94478c58b3aa3e692
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
app/api/Binding.qml

index 2d88087..d62bc6b 100644 (file)
@@ -76,7 +76,7 @@ WebSocket {
                        root.statusString = "Bad return value, binding probably not installed"
                        break
                case MessageId.event:
-                       if (json[1] == "hvac/language")
+                       if (json[1] === "hvac/language")
                                console.log("HVAC event received: ",json[2])
                                root.language = json[2].data
                                root.statusString = "Language changed to "+language