Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data binding causes infinite loop if value is NaN #1799

Closed
arodic opened this issue Jun 9, 2015 · 0 comments
Closed

Data binding causes infinite loop if value is NaN #1799

arodic opened this issue Jun 9, 2015 · 0 comments

Comments

@arodic
Copy link

arodic commented Jun 9, 2015

Steps to reproduce:

  1. Create two elements and bind some property.
  2. Make value NaN
  3. Notice error: Uncaught RangeError: Maximum call stack size exceeded.

Below is some sample code that returns error when parent-el is instantiated.

<dom-module id="child-el">
  <template>{{value}}</template>
</dom-module>
<script>
(function() {
  Polymer({
    is: 'child-el',
    properties: {
      value: {
        value: null,
        notify: true
      }
    }
  });
}());
</script>

<dom-module id="parent-el">
  <template><child-el value="{{numvalue}}"></child-el></template>
</dom-module>
<script>
(function() {
  Polymer({
    is: 'parent-el',
    properties: {
      numvalue: {
        value: NaN,
        notify: true
      }
    }
  });
}());
</script>
dfreedm added a commit that referenced this issue Jun 9, 2015
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
dfreedm added a commit that referenced this issue Jun 10, 2015
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
dfreedm added a commit that referenced this issue Jun 10, 2015
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
dfreedm added a commit that referenced this issue Jun 10, 2015
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant