Skip to content

Commit 8cb8e7a

Browse files
committed
[Fix] clean URL before generating share link (#454)
1 parent b959176 commit 8cb8e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/molecules/ChartShare/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default class ChartShare extends React.Component<Props, State> {
106106
// checkedoption i.e 1 is default 2 is as configured
107107
public async createLink(props: Props, checkedOption = 2) {
108108
if (!props.stateToShare) { return this.state; }
109-
const currentUrl = window.location.href;
109+
const currentUrl = window.location.href.split('?')[0];
110110
const chartState =
111111
checkedOption === 1 && props.stateToShare ?
112112
{ ...props.stateToShare, year: null } : props.stateToShare;

0 commit comments

Comments
 (0)