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
commit 5405fd2d7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}
/**