From 11335b148885a25a7177c4839f107a7af5454225 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Fri, 28 Jul 2017 10:18:06 +0100 Subject: [PATCH] Rename variable to curlBase, for clarity --- src/components/views/elements/AppPermission.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/views/elements/AppPermission.js b/src/components/views/elements/AppPermission.js index b37ddd8c8e..eba49ce116 100644 --- a/src/components/views/elements/AppPermission.js +++ b/src/components/views/elements/AppPermission.js @@ -6,21 +6,20 @@ export default class AppPermission extends React.Component { constructor(props) { super(props); - const curl = this.getCurl(); + const curlBase = this.getCurlBase(); this.state = { - curl: curl, + curlBase: curlBase, }; - console.log('curl', curl); } - getCurl() { + // Return string representation of content URL without query parameters + getCurlBase() { const wurl = url.parse(this.props.url); let curl; let curlString; const searchParams = new URLSearchParams(wurl.search); - // Return string representation of content URL without query parameters if(searchParams && searchParams.get('url')) { curl = url.parse(searchParams.get('url')); if(curl) { @@ -42,7 +41,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.curlBase}