summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarie Terrier <marie.terrier1@gmail.com>2018-11-10 16:50:50 +0100
committerGireesh Punathil <gpunathi@in.ibm.com>2018-11-13 10:02:56 +0530
commit733278b81bdb2c6fb35c5146fa94d9727edc6adc (patch)
tree905477c336c0606ba51b82ccba16a3f19ff5bfe7 /lib
parent0603c0a53fc7051260f3f3d3de9582bc3e6af7c9 (diff)
downloadandroid-node-v8-733278b81bdb2c6fb35c5146fa94d9727edc6adc.tar.gz
android-node-v8-733278b81bdb2c6fb35c5146fa94d9727edc6adc.tar.bz2
android-node-v8-733278b81bdb2c6fb35c5146fa94d9727edc6adc.zip
console: console.timeLog() using the default label
PR-URL: https://github.com/nodejs/node/pull/24286 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/console.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/console.js b/lib/console.js
index 39e55c202c..db22ee846f 100644
--- a/lib/console.js
+++ b/lib/console.js
@@ -260,7 +260,7 @@ Console.prototype.timeEnd = function timeEnd(label = 'default') {
}
};
-Console.prototype.timeLog = function timeLog(label, ...data) {
+Console.prototype.timeLog = function timeLog(label = 'default', ...data) {
// Coerces everything other than Symbol to a string
label = `${label}`;
timeLogImpl(this, 'timeLog', label, data);
@@ -268,7 +268,7 @@ Console.prototype.timeLog = function timeLog(label, ...data) {
};
// Returns true if label was not found
-function timeLogImpl(self, name, label = 'default', data) {
+function timeLogImpl(self, name, label, data) {
const time = self._times.get(label);
if (!time) {
process.emitWarning(`No such label '${label}' for console.${name}()`);