Fix comparison of boolean values in JS BE
See KT-16984
This commit is contained in:
@@ -17,14 +17,14 @@
|
||||
Kotlin.compareTo = function (a, b) {
|
||||
var typeA = typeof a;
|
||||
var typeB = typeof a;
|
||||
if (Kotlin.isChar(a) && typeB == "number") {
|
||||
if (Kotlin.isChar(a) && typeB === "number") {
|
||||
return Kotlin.primitiveCompareTo(a.charCodeAt(0), b);
|
||||
}
|
||||
if (typeA == "number" && Kotlin.isChar(b)) {
|
||||
if (typeA === "number" && Kotlin.isChar(b)) {
|
||||
return Kotlin.primitiveCompareTo(a, b.charCodeAt(0));
|
||||
}
|
||||
if (typeA == "number" || typeA == "string") {
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
if (typeA === "number" || typeA === "string" || typeA === "boolean") {
|
||||
return Kotlin.primitiveCompareTo(a, b);
|
||||
}
|
||||
return a.compareTo_11rb$(b);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user