You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When simplifying numerators/denominators, js-quantities uses an array as both an array and an object, setting properties on it. This makes js-quantities incompatible with libraries that extend Array.prototype, like sugarjs and prototypejs, in very surprising ways. For example:
There are numerous libraries out there (sugarjs, prototypejs) that
extend the `Array` prototype. The `simplify` function in js-quantities
relies on setting/checking properties on an array instance, which means
that it's incompatible with such libraries. Add compatibility by using a
separate object for keeping track of the counters instead of using
properties on array instances.
Fixgentooboontoo#130.
Signed-off-by: Kyle Fazzari <[email protected]>
When simplifying numerators/denominators, js-quantities uses an array as both an array and an object, setting properties on it. This makes js-quantities incompatible with libraries that extend
Array.prototype
, like sugarjs and prototypejs, in very surprising ways. For example:The text was updated successfully, but these errors were encountered: