mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
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:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user