Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sabbaticaldev
· 2y ago · 0 comments
the condition is a constant so it can be safely removed
Comments
[–]
lifthrasiir
2y ago
Only in the web environment. In fact the condition itself is true only when it runs in a web browser and not in a web worker.
[–]
sabbaticaldev
OP
2y ago
which is the case for that code and it was added by the obfuscator
[–]
lifthrasiir
2y ago
No obfuscator would add only that. It is almost surely from some library that is aware of the possibility that `window` may not exist.