Skip to content

Commit 974e6a5

Browse files
committed
[FIX] web_editor: fix localeCompare typo
In the method `isClientFirst`, if `clientA.startTime === clientB.startTime` is true (which should happen exceptionally), the code calling `localCompare` would fail as the method name is `localeCompare`. task-3217719 Part-of: odoo#114481
1 parent bf45295 commit 974e6a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/web_editor/static/src/js/wysiwyg/wysiwyg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ const Wysiwyg = Widget.extend({
457457
// Check wether clientA is before clientB.
458458
const isClientFirst = (clientA, clientB) => {
459459
if (clientA.startTime === clientB.startTime) {
460-
return clientA.id.localCompare(clientB.id) === -1;
460+
return clientA.id.localeCompare(clientB.id) < 1;
461461
} else {
462462
return clientA.startTime < clientB.startTime;
463463
}

0 commit comments

Comments
 (0)