taiga-family / ng-polymorpheus

Polymorpheus is a tiny library for polymorphic templates in Angular.

Home Page:https://stackblitz.com/edit/polymorpheus-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Incorrect behavior of the `in` operator

robertkokoev opened this issue Β· comments

🐞 Bug report

Description

'in' operator doesn't work correctly with POLYMORPHEUS_CONTEXT

Reproduction

constructor(
    @Inject(POLYMORPHEUS_CONTEXT) readonly context: Record<string, string>
  ) {
  // context = { a: 'text' }
  const hasA = 'a' in context; // false
  const value = context.a // 'text'
}

Versions

  • Angular 12
  • Taiga UI v2.20

Fixed in 3.1.11 and Taiga UI 2.22.0 coming out today