LearnNewsExamplesServices
Frontmatter
id5024
titlecontroller.Base: onHashChange() => wrong usage of `every()`
stateClosed
labels
bugstale
assigneesThorstenRaab
createdAtOct 17, 2023, 4:39 PM
updatedAtSep 13, 2024, 4:28 AM
githubUrlhttps://github.com/neomjs/neo/issues/5024
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtSep 13, 2024, 4:28 AM

controller.Base: onHashChange() => wrong usage of every()

Closed v8.1.0 bugstale
tobiu
tobiu commented on Oct 17, 2023, 4:39 PM

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every

is designed to test all entries of an array with a callback fn to check if they match a given condition.

you can use forEach() in case you just want to iterate over all items.

if you want to iterate up to a given point and then break the loop, for of is a good fit: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of

tobiu added the bug label on Oct 17, 2023, 4:39 PM
tobiu assigned to @ThorstenRaab on Oct 17, 2023, 4:39 PM
ThorstenRaab cross-referenced by PR #5043 on Oct 19, 2023, 4:17 PM