From bf124c43796f774de28e48265daff257d06b9c28 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 30 Oct 2020 21:13:01 +0000 Subject: [PATCH] Fix regression with OpenID permissions on widgets --- src/stores/widgets/StopGapWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/widgets/StopGapWidget.ts b/src/stores/widgets/StopGapWidget.ts index 4e67416d92..b5deeff21c 100644 --- a/src/stores/widgets/StopGapWidget.ts +++ b/src/stores/widgets/StopGapWidget.ts @@ -250,7 +250,7 @@ export class StopGapWidget extends EventEmitter { // Actually ask for permission to send the user's data Modal.createTrackedDialog("OpenID widget permissions", '', WidgetOpenIDPermissionsDialog, { - widgetUrl: rawUrl.substr(0, rawUrl.lastIndexOf("?")), + widgetUrl: rawUrl.includes("?") ? rawUrl.substr(0, rawUrl.indexOf("?")) : rawUrl, widgetId: this.widgetId, isUserWidget: this.appTileProps.userWidget,