eslint-plugin-compat icon indicating copy to clipboard operation
eslint-plugin-compat copied to clipboard

Minimised feature detection (&&) not handled

Open curiousdannii opened this issue 3 years ago • 0 comments

This plugin is fine with this code

if (window.ResizeObserver) {
    this.canvasResizeObserver = new ResizeObserver((entries) => this.oncanvasresize(entries));
}

But I run it on the final Terser-minimised output of my project (so that I can ensure that the final output is compatible), and it raises errors for this minimised version.

window.ResizeObserver&&(this.canvasResizeObserver=new ResizeObserver((e=>this.oncanvasresize(e))))

Can the feature detection handler be updated to support &&?

curiousdannii avatar Jan 29 '22 12:01 curiousdannii