Skip to content

Commit

Permalink
extension: expose devtools hooks reliably (#5579)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored Jun 29, 2018
1 parent db2265d commit 4542ab6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lighthouse-extension/app/src/lighthouse-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ if (typeof module !== 'undefined' && module.exports) {
getDefaultCategories,
listenForStatus,
};
} else {
// If not require()d, expose on window for devtools, other consumers of file.
}

if (typeof window !== 'undefined') {
// Expose on window for devtools, other consumers of file.
// @ts-ignore
window.runLighthouseInWorker = runLighthouseInWorker;
// @ts-ignore
Expand Down

0 comments on commit 4542ab6

Please sign in to comment.