Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.

Conversation

@DeanCording
Copy link

Any widget that uses Dashing.AnimatedValue will lock up if sent current and last values which are the same but different object types ie. current = '5' and last = 5.

Problem is due to CoffeeScript translating == comparison on line 78 into a === comparison, which fails when given different object types. As the num and to values are the same, the increment is zero. The timer termination test only checked if the num value had passed the to value, which it would never do if increment is zero. The fix adds a test if the num and to values are equal so that the timer runs once but then terminates.

Any widget that uses Dashing.AnimatedValue will lock up if sent current and last values which are the same but different object types ie. current = '5' and last = 5.

Problem is due to CoffeeScript translating == comparison on line 78 into a === comparison, which fails when given different object types.  As the num and to values are the same, the increment is zero.  The timer termination test only checked if the num value had passed the to value, which it would never do if increment is zero. The fix adds a test if the num and to values are equal so that the timer runs once but then terminates.
@DeanCording
Copy link
Author

Same change as proposed in #618

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant