Skip to content

Overridden computed property functions do not correctly observe dependency properties #5468

@n1ywb

Description

@n1ywb

Description

When a behavior overrides a computed property from an earlier behavior, the correct computing function is called, but the arguments are incorrect, it looks like it's being called with the args for the first definition of the computed function.

Live Demo

https://github.com/ReadingPlus/polymer-computed-bug

Steps to Reproduce

  1. clone above repo
  2. polymer install
  3. polymer test

Expected Results

Tests should pass

Actual Results

Test fails because computed function called with wrong args

Browsers Affected

  • Chrome
  • Firefox
  • Edge
  • Safari 11
  • Safari 10
  • IE 11

Versions

  • Polymer: v2.7.0
  • webcomponents: 1.3.0

This does NOT affect polymer 1.0. I didn't put together a polymer 1 test case because I was trying to upgrade my app from polymer 1 to 2 when I ran into this, so trust me, it works on Polymer 1. Should be easy enough to adapt this case to polymer 1 to prove it.

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