Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/template-insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ export async function resolveNestedTemplates(text, visited, templatesById, templ
}

if (!nestedTemplate) {
console.warn(`TemplateWing: referenced template not found: ${identifier}`);
console.warn("TemplateWing: referenced template not found:", JSON.stringify(identifier));
continue;
}

if (visited.has(nestedTemplate.id)) {
console.error(`TemplateWing: circular reference detected for template: ${nestedTemplate.name}`);
console.error("TemplateWing: circular reference detected for template:", JSON.stringify(nestedTemplate.name));
throw new Error(`Circular reference detected: ${nestedTemplate.name}`);
}

Expand Down Expand Up @@ -355,7 +355,7 @@ export async function insertTemplateIntoTab(tabId, template) {
const file = new File([bytes], att.name, { type: att.type });
await messenger.compose.addAttachment(tabId, { file, name: att.name });
} catch (err) {
console.error(`TemplateWing: failed to attach "${att.name}"`, err);
console.error("TemplateWing: failed to attach:", JSON.stringify(att.name), err);
attachmentErrors.push(att.name);
}
}
Expand Down
Loading