Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: document is not defined #34

Open
msafrun opened this issue Aug 10, 2023 · 0 comments
Open

ReferenceError: document is not defined #34

msafrun opened this issue Aug 10, 2023 · 0 comments

Comments

@msafrun
Copy link

msafrun commented Aug 10, 2023

When I add text in data property I get that error, but when I leave it empty string it works

Note that I use it in BE side

const bufferQRCode = new QRCodeStyling({
     data: "test",
     // data: "",
     width: 300,
     height: 300,
     type: "svg",
     image: "/favicon.ico",
     margin: 10,
     qrOptions: {
       typeNumber: 0,
       mode: "Byte",
       errorCorrectionLevel: "Q",
     },
     imageOptions: {
       hideBackgroundDots: true,
       imageSize: 0.4,
       margin: 20,
       crossOrigin: "anonymous",
     },
     dotsOptions: {
       color: "#222222",
       // gradient: {
       //   type: 'linear', // 'radial'
       //   rotation: 0,
       //   colorStops: [{ offset: 0, color: '#8688B2' }, { offset: 1, color: '#77779C' }]
       // },
       type: "rounded",
     },
     backgroundOptions: {
       color: "#5FD4F3",
       // gradient: {
       //   type: 'linear', // 'radial'
       //   rotation: 0,
       //   colorStops: [{ offset: 0, color: '#ededff' }, { offset: 1, color: '#e6e7ff' }]
       // },
     },
     cornersSquareOptions: {
       color: "#222222",
       type: "extra-rounded",
       // gradient: {
       //   type: 'linear', // 'radial'
       //   rotation: 180,
       //   colorStops: [{ offset: 0, color: '#25456e' }, { offset: 1, color: '#4267b2' }]
       // },
     },
     cornersDotOptions: {
       color: "#222222",
       type: "dot",
       // gradient: {
       //   type: 'linear', // 'radial'
       //   rotation: 180,
       //   colorStops: [{ offset: 0, color: '#00266e' }, { offset: 1, color: '#4060b3' }]
       // },
     },
   });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant