LearnNewsExamplesServices
Frontmatter
id5954
titlecollection.Base: isItem() has to return true for "object like" items
stateClosed
labels
bug
assigneestobiu
createdAtSep 21, 2024, 6:18 PM
updatedAtSep 21, 2024, 6:24 PM
githubUrlhttps://github.com/neomjs/neo/issues/5954
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtSep 21, 2024, 6:24 PM

collection.Base: isItem() has to return true for "object like" items

Closed v8.1.0 bug
tobiu
tobiu commented on Sep 21, 2024, 6:18 PM
    isItem(value) {
        return Neo.isObject(value) || Neo.isRecord(value)
    }

the change happened, when introducing Neo.isRecord() and making Neo.isObject() super strict to only return true for real objects.

collections however can contain neo instances as items, which no longer get recognised.

if the recognition no longer works, removing items will break, which can result in growing memory leaks when frequently removing items.

tobiu added the bug label on Sep 21, 2024, 6:18 PM
tobiu assigned to @tobiu on Sep 21, 2024, 6:18 PM
tobiu referenced in commit 87a6ed8 - "collection.Base: isItem() has to return true for "object like" items #5954" on Sep 21, 2024, 6:24 PM
tobiu closed this issue on Sep 21, 2024, 6:24 PM
tobiu cross-referenced by #5955 on Sep 21, 2024, 7:34 PM