Skip to content

Different way of checking if browser is defined? #68

@fstanis

Description

@fstanis

I found a peculiar bug with using webextension-polyfill in webpack: issue 5828.

Long story short, the polyfill guard confuses webpack in certain circumstances:

if (typeof browser === "undefined") {

This got me thinking, any reason why something simpler like if (!window.browser) { is not used here instead?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions