summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/pdf/js/pdf-util.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/js/pdf-util.js b/source/pdf/js/pdf-util.js
index 0416ce7a..9a62add0 100644
--- a/source/pdf/js/pdf-util.js
+++ b/source/pdf/js/pdf-util.js
@@ -5,9 +5,9 @@ var MuPDF = {
dayName: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
padZeros: function(num, places) {
- var s = num.toString();
- if (s.length < places)
- s = new Array(places-s.length+1).join('0') + s;
+ var s = String(num)
+ while (s.length < places)
+ s = '0' + s
return s;
},