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: I374749e71705b24eb793e0ba8a5efacc81ea40de
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
states: [
State {
name: 'active'
states: [
State {
name: 'active'
- when: loc.currentId == model.id
+ when: loc.currentId === model.id
PropertyChanges {
target: container
x: loc.mouseX - width/2
PropertyChanges {
target: container
x: loc.mouseX - width/2
onConditionChanged: {
var icon = ''
onConditionChanged: {
var icon = ''
- if (condition.indexOf("clouds") != -1) {
+ if (condition.indexOf("clouds") !== -1) {
icon = "WeatherIcons_Cloudy-01.png"
icon = "WeatherIcons_Cloudy-01.png"
- } else if (condition.indexOf("thunderstorm") != -1) {
+ } else if (condition.indexOf("thunderstorm") !== -1) {
icon = "WeatherIcons_Thunderstorm-01.png"
icon = "WeatherIcons_Thunderstorm-01.png"
- } else if (condition.indexOf("snow") != -1) {
+ } else if (condition.indexOf("snow") !== -1) {
icon = "WeatherIcons_Snow-01.png"
icon = "WeatherIcons_Snow-01.png"
- } else if (condition.indexOf("rain") != -1) {
+ } else if (condition.indexOf("rain") !== -1) {
icon = "WeatherIcons_Rain-01.png"
}
icon = "WeatherIcons_Rain-01.png"
}