LearnNewsExamplesServices
Frontmatter
id7908
titleRefactor vdom.Helper initAsync to use optional chaining
stateClosed
labels
airefactoring
assigneestobiu
createdAtNov 26, 2025, 1:12 PM
updatedAtNov 26, 2025, 1:16 PM
githubUrlhttps://github.com/neomjs/neo/issues/7908
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 26, 2025, 1:16 PM

Refactor vdom.Helper initAsync to use optional chaining

Closed v11.11.0 airefactoring
tobiu
tobiu commented on Nov 26, 2025, 1:12 PM

In src/vdom/Helper.mjs, the initAsync method currently checks !NeoConfig.unitTestMode before accessing Neo.currentWorker. Using optional chaining Neo.currentWorker?.on(...) is cleaner and handles cases where currentWorker is undefined without an explicit mode check.

tobiu added the ai label on Nov 26, 2025, 1:12 PM
tobiu added the refactoring label on Nov 26, 2025, 1:12 PM
tobiu assigned to @tobiu on Nov 26, 2025, 1:13 PM
tobiu referenced in commit f7b79d5 - "Refactor vdom.Helper initAsync to use optional chaining #7908" on Nov 26, 2025, 1:15 PM
tobiu closed this issue on Nov 26, 2025, 1:16 PM