react-pdf-viewer / starter

Some boilerplates to use React PDF viewer component
https://react-pdf-viewer.dev
24 stars 30 forks source link

Getting server error #48

Open PSMJonas opened 10 months ago

PSMJonas commented 10 months ago

Hey! I'm alsways getting the a server error:

TypeError: Cannot read properties of undefined (reading 'includes')

I have used the example implementation (Next.js):

screen

Apparently this line is to blame for the error:

static get platform() {
    const platform = typeof navigator !== "undefined" ? navigator.platform : "";
    return (0, _util.shadow)(this, "platform", {
      isWin: platform.includes("Win"),
      isMac: platform.includes("Mac")
    });
}