From 9f2a27cc84ad2e054e610effea5e92b5c02128fd Mon Sep 17 00:00:00 2001 From: Justin Halsall Date: Fri, 2 Aug 2024 09:23:49 +0200 Subject: [PATCH] Update packages/rrdom/src/document.ts --- packages/rrdom/src/document.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rrdom/src/document.ts b/packages/rrdom/src/document.ts index 7df931860a..f3f55aec1a 100644 --- a/packages/rrdom/src/document.ts +++ b/packages/rrdom/src/document.ts @@ -474,7 +474,8 @@ export class BaseRRElement extends BaseRRNode implements IRRElement { } public getAttribute(name: string): string | null { - return this.attributes[name] ?? null; + if (this.attributes[name] === undefined) return null; + return this.attributes[name]; } public setAttribute(name: string, attribute: string) {