web/flow: bug: inspector button not hiding when unavailable (#20717)

* Bad check on my part; URLSearchParams returns 'null', which is not undefined (according to Javascript).

* A better check.
This commit is contained in:
Ken Sternberg
2026-03-04 09:06:16 -08:00
committed by GitHub
parent e8c845d682
commit ce1237e03f
@@ -33,7 +33,7 @@ export class FlowInspectorButton extends WithCapabilitiesConfig(AKElement) {
public override connectedCallback() {
super.connectedCallback();
const inspector = new URLSearchParams(window.location.search).get("inspector");
this.available = this.can(CapabilitiesEnum.CanDebug) || inspector !== undefined;
this.available = this.can(CapabilitiesEnum.CanDebug) || typeof inspector === "string";
this.open = inspector === "" || inspector === "open";
}