diff --git a/ddocs/users-meta-db/users-meta/views/device_by_user/map.js b/ddocs/users-meta-db/users-meta/views/device_by_user/map.js index 3edc3071c69..32cf781fef6 100644 --- a/ddocs/users-meta-db/users-meta/views/device_by_user/map.js +++ b/ddocs/users-meta-db/users-meta/views/device_by_user/map.js @@ -9,7 +9,8 @@ function(doc) { doc.metadata.day ) { var pad = function (number) { - return number.toString().padStart(2, '0'); + var string = number.toString(); + return string.length === 2 ? string : '0' + string; }; emit([doc.metadata.user, doc.metadata.deviceId], {