nomagick commited on
Commit
b674d26
·
unverified ·
1 Parent(s): 4e299bf

fix: clean HTML timer

Browse files
Files changed (1) hide show
  1. src/services/jsdom.ts +3 -1
src/services/jsdom.ts CHANGED
@@ -316,12 +316,14 @@ export class JSDomControl extends AsyncService {
316
  }
317
  });
318
 
 
 
319
  const dt = Date.now() - t0;
320
  if (dt > 1000) {
321
  this.logger.warn(`Performance issue: Cleaning HTML for LMs took ${dt}ms`, { dt });
322
  }
323
 
324
- return this.cleanRedundantEmptyLines(jsdom.window.document.documentElement.outerHTML);
325
  }
326
 
327
  snippetToElement(snippet?: string, url?: string) {
 
316
  }
317
  });
318
 
319
+ const final = this.cleanRedundantEmptyLines(jsdom.window.document.documentElement.outerHTML);
320
+
321
  const dt = Date.now() - t0;
322
  if (dt > 1000) {
323
  this.logger.warn(`Performance issue: Cleaning HTML for LMs took ${dt}ms`, { dt });
324
  }
325
 
326
+ return final;
327
  }
328
 
329
  snippetToElement(snippet?: string, url?: string) {