From 8cb8e7aa917361d11c4d232180e33a5783a3dbb8 Mon Sep 17 00:00:00 2001 From: "Edwin P. Magezi" Date: Tue, 29 Jan 2019 13:11:51 +0300 Subject: [PATCH] [Fix] clean URL before generating share link (#454) --- src/components/molecules/ChartShare/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/molecules/ChartShare/index.tsx b/src/components/molecules/ChartShare/index.tsx index 3832dae70..1071f8714 100644 --- a/src/components/molecules/ChartShare/index.tsx +++ b/src/components/molecules/ChartShare/index.tsx @@ -106,7 +106,7 @@ export default class ChartShare extends React.Component { // checkedoption i.e 1 is default 2 is as configured public async createLink(props: Props, checkedOption = 2) { if (!props.stateToShare) { return this.state; } - const currentUrl = window.location.href; + const currentUrl = window.location.href.split('?')[0]; const chartState = checkedOption === 1 && props.stateToShare ? { ...props.stateToShare, year: null } : props.stateToShare;