Merge pull request #465 from neo/patch-1

Remove unused return in `forEach` of `YMap`
This commit is contained in:
Kevin Jahns
2022-09-20 13:07:23 +02:00
committed by GitHub

View File

@@ -167,16 +167,11 @@ export class YMap extends AbstractType {
* @param {function(MapType,string,YMap<MapType>):void} f A function to execute on every element of this YArray.
*/
forEach (f) {
/**
* @type {Object<string,MapType>}
*/
const map = {}
this._map.forEach((item, key) => {
if (!item.deleted) {
f(item.content.getContent()[item.length - 1], key, this)
}
})
return map
}
/**