Skip to content

Commit

Permalink
Update wp-rocket-scripts to v1.0.4 (#6868)
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuLamiot authored Aug 14, 2024
1 parent d499588 commit 4ba21e0
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 8,363 deletions.
9 changes: 8 additions & 1 deletion assets/js/wpr-beacon.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,21 @@
this._handleInfiniteLoop();
}, 1e4);
const isGeneratedBefore = await this._getGeneratedBefore();
let shouldSaveResultsIntoDB = false;
const shouldGenerateLcp = this.config.status.atf && isGeneratedBefore === false;
if (shouldGenerateLcp) {
this.lcpBeacon = new BeaconLcp_default(this.config, this.logger);
await this.lcpBeacon.run();
shouldSaveResultsIntoDB = true;
} else {
this.logger.logMessage("Not running BeaconLcp because data is already available");
}
this._saveFinalResultIntoDB();
if (shouldSaveResultsIntoDB) {
this._saveFinalResultIntoDB();
} else {
this.logger.logMessage("Not saving results into DB as no beacon features ran.");
this._finalize();
}
}
async _isValidPreconditions() {
const threshold = {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/wpr-beacon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4ba21e0

Please sign in to comment.