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
14 changes: 5 additions & 9 deletions src/tag-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,10 @@ class TagList {
_getAllTemplates (PLC: Controller): Promise<void> {
return new Promise (async (resolve, reject) => {
for (const tag of this.tags) {
if (tag.type.structure && !this.templates[tag.type.code]) {

try {
const template = new Template();
await template.getTemplate(PLC, tag.type.code);
this.templates[tag.type.code] = template;
} catch (e) { /* ignore template fetching errors */ }

if (tag.type.structure && !this.templates[tag.type.code]) {
const template = new Template();
await template.getTemplate(PLC, tag.type.code).catch((e) => { /* ignore template fetching errors */ });
this.templates[tag.type.code] = template;
}
}

Expand Down Expand Up @@ -316,4 +312,4 @@ class TagList {
}

export default TagList;
export {tagListTag, tagListTemplates, tagListTagType}
export {tagListTag, tagListTemplates, tagListTagType}