1
0
mirror of https://github.com/dzeiocom/libs.git synced 2025-04-22 10:52:11 +00:00
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-12-17 16:07:00 +01:00
parent ba39a4eef8
commit 59897643a4

View File

@ -138,7 +138,7 @@ export default class DOMElement<T extends HTMLElement = HTMLElement> {
public attr(key: string, value: string | null): this
public attr(key: keyof T, value: boolean): this
public attr(key: string | keyof T, value?: string | boolean | null): this | string | null {
if (!value) {
if (typeof value === 'undefined') {
return this.item.getAttribute(key as string)
}
if (value === null) {