Skip to content

Commit ff1e247

Browse files
committed
Define id before use
1 parent 5793d0a commit ff1e247

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

miniprofiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ function middleware(f) {
145145
static(reqPath, res);
146146
return;
147147
}
148+
var id = startProfiling(req, enabled);
148149
if (enabled) {
149150
res.on('header', function() {
150151
stopProfiling(req);
151152
});
152153
res.setHeader("X-MiniProfiler-Ids", '["' + id + '"]');
153154
}
154-
var id = startProfiling(req, enabled);
155155
next();
156156
};
157157
}

0 commit comments

Comments
 (0)