Skip to content

Commit

Permalink
Merge pull request #50 from judithweng/main
Browse files Browse the repository at this point in the history
Update Importing Modules
  • Loading branch information
scholtz authored Sep 7, 2024
2 parents 319fc26 + e06e7e9 commit 3df1d9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/QRCodeStyling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import QRCanvas from "./QRCanvas";
import defaultOptions, { type Options, type RequiredOptions } from "./QROptions";
import sanitizeOptions from "../tools/sanitizeOptions";
import type { Extension, QRCode } from "../types";
import qrcode from "qrcode-generator";
import * as qr from "qrcode-generator";

type DownloadOptions = {
name?: string;
Expand Down Expand Up @@ -38,7 +38,7 @@ export default class QRCodeStyling {
return;
}

this._qr = <QRCode>qrcode(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel);
this._qr = <QRCode>qr.default(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel);
this._qr.addData(this._options.data, this._options.qrOptions.mode || getMode(this._options.data));
this._qr.make();
this._canvas = new QRCanvas(this._options);
Expand Down

0 comments on commit 3df1d9e

Please sign in to comment.