Skip to content

Commit

Permalink
[Fix] clean URL before generating share link (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinmp committed Jan 29, 2019
1 parent b959176 commit 8cb8e7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/molecules/ChartShare/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class ChartShare extends React.Component<Props, State> {
// 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;
Expand Down

0 comments on commit 8cb8e7a

Please sign in to comment.