Skip to content

Commit

Permalink
Fix devtools detection perf issue on Firefox
Browse files Browse the repository at this point in the history
Clearing console allows to not overload it on Firefox. Detection still
does not work (whereas it works on Chrome), but it will properly stop
and won't overload CPU/RAM.
Idea by @J12934
Closes juice-shop#1525

Signed-off-by: Clément Notin <[email protected]>
  • Loading branch information
cnotin committed Dec 21, 2020
1 parent 11baacc commit 250ba46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/hacking-instructor/helpers/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export function waitForDevTools () {
return async () => {
while (true) {
console.dir(element)
console.clear()
if (checkStatus) {
break
}
Expand Down

0 comments on commit 250ba46

Please sign in to comment.