Skip to content

Loading…

Data binding causes infinite loop if value is NaN #1799

Closed
arodic opened this Issue · 0 comments

1 participant

@arodic

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>
@azakus azakus referenced this issue from a commit
@azakus azakus Handle NaN in bindings
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
c85a2df
@azakus azakus referenced this issue from a commit
@azakus azakus Handle NaN in bindings
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
8a964ba
@azakus azakus referenced this issue from a commit
@azakus azakus Handle NaN in bindings
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
dcb67ed
@azakus azakus referenced this issue from a commit
@azakus azakus Handle NaN in bindings
Make our own equality check for NaN that uses the identity-check failure

Fixes #1799
48edb32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.