Skip to content

Commit

Permalink
ignore uknown browser engine kind in detectEvalLengthInconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
xnerhu committed Sep 10, 2023
1 parent 0538823 commit d96fb6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/detectors/eval_length.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export function detectEvalLengthInconsistency({ evalLength }: ComponentDict): De
const length = evalLength.value
const browser = getBrowserKind()
const browserEngine = getBrowserEngineKind()
if (browserEngine == BrowserEngineKind.Unknown) {
return false
}
return (
(length === 37 && !arrayIncludes([BrowserEngineKind.Webkit, BrowserEngineKind.Gecko], browserEngine)) ||
(length === 39 && !arrayIncludes([BrowserKind.IE], browser)) ||
Expand Down

0 comments on commit d96fb6a

Please sign in to comment.