8000 Fixing problems with large numbers and formatNumber by danprince · Pull Request #12709 · angular/angular.js · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Fixing problems with large numbers and formatNumber #12709

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
style(filters) fix coding style on if statement
  • Loading branch information
danprince committed Aug 30, 2015
commit 7691f0a993fb197a074fbc34c6183fbc215a716b
2 changes: 1 addition & 1 deletion src/ng/filter/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
}

// round the number only if it's decimal
if(number.toString().indexOf('.') >= 0) {
if (number.toString().indexOf('.') >= 0) {
// safely round numbers in JS without hitting imprecisions of floating-point arithmetics
// inspired by:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
Expand Down
0