Bug 1346812 - Use standard pad functions in aboutTelemetry.js r=gfritzsche
☠☠ backed out by d983cb91c5a4 ☠ ☠
authorflyingrub
Mon, 13 Mar 2017 16:12:00 +0100
changeset 347347 446bc40870fecc7ec49f1ae8b3aa6f6b2a62a56e
parent 347346 b62199ddf0f3f19a0319e565f076fb65137ada95
child 347348 335a2fee24a89a49eaac0507d24968418fb3f430
push id31496
push usercbook@mozilla.com
push dateTue, 14 Mar 2017 13:21:57 +0000
treeherdermozilla-central@9a26ed658fdc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche
bugs1346812
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1346812 - Use standard pad functions in aboutTelemetry.js r=gfritzsche MozReview-Commit-ID: 7S3tUVvoKsv
toolkit/content/aboutTelemetry.js
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -170,17 +170,17 @@ function removeAllChildNodes(node) {
     node.removeChild(node.lastChild);
   }
 }
 
 /**
  * Pad a number to two digits with leading "0".
  */
 function padToTwoDigits(n) {
-  return (n > 9) ? n : "0" + n;
+  return new String(n).padStart(2,"0");
 }
 
 /**
  * Return yesterdays date with the same time.
  */
 function yesterday(date) {
   let d = new Date(date);
   d.setDate(d.getDate() - 1);