diff options
author | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2019-09-22 20:56:19 +0800 |
---|---|---|
committer | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2019-09-22 20:56:19 +0800 |
commit | 57881a95bf730dec7dd010bc086a5c42003840d4 (patch) | |
tree | 46c93228a9c74366026ceb45b282767e5e9564a6 /app/api | |
parent | ae47635e56c4af4d816a76e5186e945768543679 (diff) |
fix: Remove qml M126 warningicefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.18.99.58.99.48.99.38.99.28.99.1
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: I4dd5848797f445d082242a5c5e2a0148ea790dc0
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
Diffstat (limited to 'app/api')
-rw-r--r-- | app/api/GPS.qml | 2 | ||||
-rw-r--r-- | app/api/GeoFence.qml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/api/GPS.qml b/app/api/GPS.qml index 679c66e..95c7712 100644 --- a/app/api/GPS.qml +++ b/app/api/GPS.qml @@ -55,7 +55,7 @@ WebSocket { case msgid.event: var payload = JSON.parse(JSON.stringify(json[2])) var event = payload.event - if (event == "gps/location") { + if (event === "gps/location") { var data = json[2].data var latitude = data.latitude var longitude = data.longitude diff --git a/app/api/GeoFence.qml b/app/api/GeoFence.qml index 7061984..a39eecb 100644 --- a/app/api/GeoFence.qml +++ b/app/api/GeoFence.qml @@ -55,7 +55,7 @@ WebSocket { case msgid.event: var payload = JSON.parse(JSON.stringify(json[2])) var event = payload.event - if (event == "geofence/fence") { + if (event === "geofence/fence") { var data = json[2].data console.log("geofence event - name: " + data.name + " state: " + data.state) } |