This project is archived and is in readonly mode.

#527 ✓resolved
Robin Summerhill

Number.format modifies options argument when formatting negative numbers

Reported by Robin Summerhill | February 26th, 2011 @ 04:11 PM | in 1.3.2.1

Mootools-more 1.3.1.1

When formatting negative numbers Number.format modifies the prefix and suffix fields of the options argument. If the caller of this function is re-using the options object for multiple calls to Number.format then 'prefix' will accumulate successive minus signs on each call.

Add options = Object.clone(options) at the start of Number.format or extract prefix and suffix into local variables before modification.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket

Pages