Fix bug when finding unique OO id

https://github.com/cryptpad/cryptpad/issues/1446
This commit is contained in:
Wolfgang Ginolas 2024-04-26 10:56:20 +02:00 committed by wginolas
parent 0604b708dc
commit 82daeb98aa

View File

@ -198,7 +198,7 @@ define([
myOOId = Util.createRandomInteger();
// f: function used in .some(f) but defined outside of the while
var f = function (id) {
return ids[id] === myOOId;
return ids[id].ooid === myOOId;
};
while (Object.keys(ids).some(f)) {
myOOId = Util.createRandomInteger();