Merge pull request #1571 from ONLYOFFICE/fix/fix-bugs

[DE PE SSE] Fix shape menu component
This commit is contained in:
Julia Radzhabova 2022-02-15 21:50:42 +03:00 committed by GitHub
commit fa0679e09e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1579,11 +1579,8 @@ define([
selected: false,
groupName: groupName
};
me.recentShapes.unshift(model);
if (me.recentShapes.length > 12) {
me.recentShapes.splice(12, 1);
}
Common.localStorage.setItem(this.appPrefix + 'recent-shapes', JSON.stringify(me.recentShapes));
var arr = [model].concat(me.recentShapes.slice(0, 11));
Common.localStorage.setItem(this.appPrefix + 'recent-shapes', JSON.stringify(arr));
me.recentShapes = undefined;
},
updateRecents: function () {