diff --git a/dist/tags/base.d.ts b/dist/tags/base.d.ts index 83507cf..0873e12 100644 --- a/dist/tags/base.d.ts +++ b/dist/tags/base.d.ts @@ -32,7 +32,7 @@ export declare class TagCollection implements TagCollectionType { tags: TagType[]; map: Map; constructor(tags: TagType[]); - getByName(name: string): TagType; + getByName(name: string): TagType | undefined; getByElementName(element: string): TagType | undefined; } export {}; diff --git a/src/ts/tags/base.ts b/src/ts/tags/base.ts index be9c6d1..7c3657a 100644 --- a/src/ts/tags/base.ts +++ b/src/ts/tags/base.ts @@ -157,7 +157,7 @@ export class TagCollection implements TagCollectionType { } } - getByName(name: string) { + getByName(name: string): TagType | undefined { return this.tags.filter(t => { t.constructor.name == name })[0] || undefined;