Fix getByName()
This commit is contained in:
1 parent
0fb18de28e
commit
0df3677579
2 files changed
+2
-6
No files matched your search
Vendored
+1
-3
@@ -144,9 +144,7 @@ class TagCollection {
|
||||
}
|
||||
}
|
||||
getByName(name) {
|
||||
return this.tags.filter(t => {
|
||||
t.constructor.name == name;
|
||||
})[0] || undefined;
|
||||
return this.tags.filter(t => t.constructor.name == name)[0] || undefined;
|
||||
}
|
||||
getByElementName(element) {
|
||||
const el = element.toUpperCase();
|
||||
|
||||
+1
-3
@@ -158,9 +158,7 @@ export class TagCollection implements TagCollectionType {
|
||||
}
|
||||
|
||||
getByName(name: string): TagType | undefined {
|
||||
return this.tags.filter(t => {
|
||||
t.constructor.name == name
|
||||
})[0] || undefined;
|
||||
return this.tags.filter(t => { return t.constructor.name == name })[0] || undefined;
|
||||
}
|
||||
|
||||
getByElementName(element: string): TagType | undefined {
|
||||
|
||||
Reference in new issue
Block a user