chore(ai): remove dead code (agent)

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-01-30 20:54:52 +00:00
1 parent 13f8b9f6aa
commit 60fa6c4282
10 files changed
+81 -154

No files matched your search

+1 -45
View File
@@ -3,10 +3,7 @@ const hasDocument =
typeof document.createElement === "function" &&
typeof document.createElementNS === "function";
let QRCodeExport = null;
let createQrCodeExport = null;
let renderQrCodeExport = null;
let updateQrCodeExport = null;
if (hasDocument) {
/**
@@ -750,56 +747,15 @@ if (hasDocument) {
QRCode.CorrectLevel = QRErrorCorrectLevel;
})();
QRCodeExport = QRCode;
createQrCodeExport = function createQrCode(element, options = {}) {
return new QRCode(element, options);
};
renderQrCodeExport = function renderQrCode(element, text, options = {}) {
const normalizedOptions = Object.assign({}, options, { text });
const instance = new QRCode(element, normalizedOptions);
return instance;
};
updateQrCodeExport = function updateQrCode(instance, text) {
if (!instance || typeof instance.makeCode !== "function") {
throw new Error("Invalid QRCode instance");
}
instance.makeCode(text);
return instance;
};
} else {
class QRCodeStub {
constructor() {
throw new Error("QR code rendering requires a DOM environment.");
}
makeCode() {
throw new Error("QR code rendering requires a DOM environment.");
}
clear() {}
}
QRCodeExport = QRCodeStub;
createQrCodeExport = function createQrCodeStub() {
throw new Error("QR code rendering requires a DOM environment.");
};
renderQrCodeExport = function renderQrCodeStub() {
throw new Error("QR code rendering requires a DOM environment.");
};
updateQrCodeExport = function updateQrCodeStub() {
throw new Error("QR code rendering requires a DOM environment.");
};
}
export { QRCodeExport as QRCode };
export {
createQrCodeExport as createQrCode,
renderQrCodeExport as renderQrCode,
updateQrCodeExport as updateQrCode,
};
export { renderQrCodeExport as renderQrCode };