Skip to content

Commit

Permalink
fix(ccfinder): fix num is not a number
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyoukun committed Jun 6, 2018
1 parent ae91626 commit b168e7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/tsw/runtime/CCFinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,16 @@ this.check = function (req, res) {
Object.keys(cache.ipCacheLast).forEach(function (ip, i) {

let num = '';
let tmp = '';

if (
cache.ipCacheLast[ip]
&& cache.ipCacheLast[ip].list
&& cache.ipCacheLast[ip].list.length > 1
) {
num = String(cache.ipCacheLast[ip].list.length);
num = (num + 'XXXXXX').slice(0, 8).replace(/X/g, ' ');
content += `<div style="font-size:12px;">${num}${ip}</div>`;
num = cache.ipCacheLast[ip].list.length;
tmp = (num + '--------').slice(0, 8);
content += `<div style="font-size:12px;">${tmp}${ip}</div>`;

if (num > max.num) {
max.num = num;
Expand Down

0 comments on commit b168e7f

Please sign in to comment.