Fix sort function to work with Safari
Use localeCompare to compare strings instead of '>' so that arrays sort as expected in Safari. Bug: Issue 7057 Change-Id: I9c68e12d25df8c227dfb70c383eca8b2d79a25c5
This commit is contained in:
@@ -143,7 +143,8 @@ limitations under the License.
|
||||
value: obj[key],
|
||||
};
|
||||
}).sort((a, b) => {
|
||||
return a.id > b.id;
|
||||
// Since IDs are strings, use localeCompare.
|
||||
return a.id.localeCompare(b.id);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user