Skip to content

Commit

Permalink
added semicollons
Browse files Browse the repository at this point in the history
  • Loading branch information
petrpatek committed Nov 16, 2022
1 parent ba07a2f commit 4538da6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/fingerprint-injector/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,21 +258,21 @@ function overrideWebGl(webGl) {
try {
const getParameterProxyHandler = {
apply: function (target, ctx, args) {
const param = (args || [])[0]
const result = cache.Reflect.apply(target, ctx, args)
const param = (args || [])[0];
const result = cache.Reflect.apply(target, ctx, args);
// UNMASKED_VENDOR_WEBGL
if (param === 37445) {
return webGl.vendor
return webGl.vendor;
}
// UNMASKED_RENDERER_WEBGL
if (param === 37446) {
return webGl.renderer
return webGl.renderer;
}
return result
return result;
}
}
const addProxy = (obj, propName) => {
overridePropertyWithProxy(obj, propName, getParameterProxyHandler)
overridePropertyWithProxy(obj, propName, getParameterProxyHandler);
}
// For whatever weird reason loops don't play nice with Object.defineProperty, here's the next best thing:
addProxy(WebGLRenderingContext.prototype, 'getParameter');
Expand Down

0 comments on commit 4538da6

Please sign in to comment.