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: If0648d063b64ac2b4265006942b9c69991459836
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
case msgid.event:
var payload = JSON.parse(JSON.stringify(json[2]))
var event = payload.event
- if (event == "mediascanner/media_added") {
+ if (event === "mediascanner/media_added") {
console.debug("Media playlist is updated")
root.add(json[2].data.Media)
- } else if (event == "mediascanner/media_removed") {
+ } else if (event === "mediascanner/media_removed") {
root.remove(json[2].data.Path)
}
break