mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Do js check on value in array by doing type coercion (fix error hidden bubble on Qt5.12.12)
This commit is contained in:
parent
b52b1ff16f
commit
b393b5d0e0
1 changed files with 1 additions and 4 deletions
|
|
@ -577,23 +577,20 @@ function getExtension (str) {
|
|||
// Test if a value is included in an array or object.
|
||||
function includes (obj, value, startIndex) {
|
||||
obj = ensureArray(obj)
|
||||
|
||||
if (startIndex == null) {
|
||||
startIndex = 0
|
||||
}
|
||||
|
||||
var length = obj.length
|
||||
|
||||
for (var i = startIndex; i < length; i++) {
|
||||
if (
|
||||
value === obj[i] ||
|
||||
value == obj[i] ||
|
||||
// Check `NaN`.
|
||||
(value !== value && obj[i] !== obj[i])
|
||||
) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue