Skip to content

Regression: bindings with ?. operator #410

Description

@gh-at-sqh

Error:
Bad operator: '}'. of 'css':{'simple-numbered-chapters':$root.server()?.enableSimpleNumberedChapters}
_/ 🔥 _

at Parser.createError (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:2793:14)
at Parser.error (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:2786:18)
at Parser.operator (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:3066:16)
at Parser.expression (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:3133:19)
at Parser.singleValueExpression (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:3205:19)
at Parser.object (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:2903:51)
at Parser.value (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:3022:23)
at Parser.expression (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:3144:27)
at Parser.singleValueExpression (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:3205:19)
at Parser.readBindings (https://localhost:4001/assets/js/knockout/tko.knockout-4.1.0.js:3357:37)

Working in ko 3.5.0, straight-up replacement with tko 4.1.0.
Disappears if I replace the ?. operator with ..
But then chokes on very next usage of an observable()?. in a using or if binding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions