From 42b9894ad7ef934b35ef50f90cf19dd948d47116 Mon Sep 17 00:00:00 2001 From: gxcsoccer Date: Tue, 9 Oct 2018 17:36:04 +0800 Subject: [PATCH] fix: performance issue --- src/common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common.js b/src/common.js index 152ffa76..e0de3fb5 100644 --- a/src/common.js +++ b/src/common.js @@ -64,15 +64,15 @@ function setup(env) { var prevTime; function debug() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - // Disabled? if (!debug.enabled) { return; } + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + var self = debug; // Set `diff` timestamp var curr = Number(new Date());