Skip to content

get helper returns undefined when the key is a string containing a period#21411

Description

@fdeters

馃悶 Describe the Bug

Ember's get helper from @ember/helper can't handle accessing a value in an object when the key is a string with a dot in it.

E.g. applying {{ get obj 'some.key' }} to const obj = { 'some.key': 'some value' };will returnundefinedrather than'some value'`.

馃敩 Minimal Reproduction

See description above and this reproduction on latest Ember: Repro on Limber

馃槙 Actual Behavior

Ember's get helper returns undefined when attempting to access a key that is a string containing a period.

馃 Expected Behavior

I expect the get helper to handle accessing keys on objects just like vanilla JavaScript does. Barring that, I expect clear documentation about the different behavior.

馃實 Environment

  • Ember: 6.12.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions