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) {
|
getByName(name) {
|
||||||
return this.tags.filter(t => {
|
return this.tags.filter(t => t.constructor.name == name)[0] || undefined;
|
||||||
t.constructor.name == name;
|
|
||||||
})[0] || undefined;
|
|
||||||
}
|
}
|
||||||
getByElementName(element) {
|
getByElementName(element) {
|
||||||
const el = element.toUpperCase();
|
const el = element.toUpperCase();
|
||||||
|
|||||||
+1
-3
@@ -158,9 +158,7 @@ export class TagCollection implements TagCollectionType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getByName(name: string): TagType | undefined {
|
getByName(name: string): TagType | undefined {
|
||||||
return this.tags.filter(t => {
|
return this.tags.filter(t => { return t.constructor.name == name })[0] || undefined;
|
||||||
t.constructor.name == name
|
|
||||||
})[0] || undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getByElementName(element: string): TagType | undefined {
|
getByElementName(element: string): TagType | undefined {
|
||||||
|
|||||||
Reference in new issue
Block a user