atbuild icon indicating copy to clipboard operation
atbuild copied to clipboard

Issue : Missing dependency in `light.js`

Open PrinceSajjadHussain opened this issue 6 months ago • 0 comments

The light.js file uses window which is a Browser API so it is likely that the project uses a bundler or a dependency that polyfills window and makes it available on Node.js. However, there is no dependency on this listed, or a comment justifying this usage, meaning it could be an error. If this is not the case, then the check should be removed altogether for optimal performance.

Body: The light.js file checks for the existence of window before requiring different modules. Because the check assumes that the code will always run in either a Node.js or browser environment it should be verified that window is polyfilled in Node.js environments, or remove the if statement altogether and add two separate files.

PrinceSajjadHussain avatar Jun 23 '25 02:06 PrinceSajjadHussain