From 14f79018adc76f5c8e6a9659d4c89fbe8061b510 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 19 Jul 2022 14:43:24 -0400 Subject: [PATCH] fx-compat: Scaffold: Fix "undefined" attributes --- chrome/content/scaffold/scaffold.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/scaffold/scaffold.js b/chrome/content/scaffold/scaffold.js index 50f020fb42..19e995ded1 100644 --- a/chrome/content/scaffold/scaffold.js +++ b/chrome/content/scaffold/scaffold.js @@ -1630,8 +1630,8 @@ var Scaffold = new function () { function wrapWithHBox(elem, { flex = undefined, width = undefined } = {}) { let hbox = document.createXULElement('hbox'); hbox.append(elem); - hbox.setAttribute('flex', flex); - hbox.setAttribute('width', width); + if (flex !== undefined) hbox.setAttribute('flex', flex); + if (width !== undefined) hbox.setAttribute('width', width); return hbox; } @@ -1685,7 +1685,7 @@ var Scaffold = new function () { let defer = document.createXULElement('checkbox'); defer.checked = test.defer; defer.disabled = true; - hbox.appendChild(wrapWithHBox(defer)); + hbox.appendChild(wrapWithHBox(defer, { width: 30 })); item.appendChild(hbox);