From 9ee1f3962dc33d4f0a431b81ac375900af3b866d Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Thu, 27 Jul 2017 16:42:29 +0100 Subject: [PATCH] Set display URL from wurl if curl not specified. --- src/components/views/elements/AppPermission.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/AppPermission.js b/src/components/views/elements/AppPermission.js index ad697e2df0..369ffeade7 100644 --- a/src/components/views/elements/AppPermission.js +++ b/src/components/views/elements/AppPermission.js @@ -21,7 +21,10 @@ export default class AppPermission extends React.Component { if(searchParams && searchParams.get('url')) { curl = searchParams.get('url'); } - curl = curl || wurl; + if (!curl && wurl) { + wurl.search = wurl.query = ""; + curl = wurl.format(); + } return curl; } @@ -32,7 +35,7 @@ export default class AppPermission extends React.Component { Warning
- Do you want to load widget from URL?: {this.state.curl} + Do you want to load widget from URL: {this.state.curl}