Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
1.2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Cody Nguyen committed Sep 17, 2021
1 parent 59c963c commit cc91d61
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simi-pagebuilder-react",
"version": "1.2.12",
"version": "1.2.13",
"description": "SimiCart React PageBuilder Client",
"author": "SimiCart",
"license": "MIT",
Expand Down
28 changes: 14 additions & 14 deletions src/Content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,19 @@ const PbContent = (props) => {
if (item.dataParsed && item.dataParsed.openUrl && item.type !== 'text') {
const openUrlInNewTab = parseInt(item.dataParsed.openUrlInNewTab) === 1;
itemProps.onClick = () => {
if (
history &&
!openUrlInNewTab &&
item.dataParsed.openUrl.indexOf('http') === -1
)
history.push(item.dataParsed.openUrl);
else {
window.open(
item.dataParsed.openUrl,
openUrlInNewTab ? '_blank' : '_self',
);
}
}
if (
history &&
!openUrlInNewTab &&
item.dataParsed.openUrl.indexOf('http') === -1
)
history.push(item.dataParsed.openUrl);
else {
window.open(
item.dataParsed.openUrl,
openUrlInNewTab ? '_blank' : '_self',
);
}
};
}
if (item.type === 'form_group') {
const formMethod = item.dataParsed[formSubmitMethod] || 'GET';
Expand Down Expand Up @@ -205,7 +205,7 @@ const PbContent = (props) => {
to={item.dataParsed.openUrl}
target={openUrlInNewTab ? '_blank' : '_self'}
rel='noreferrer'
{...itemProps}
{...itemProps}
>
{innerContent}
</Link>
Expand Down

0 comments on commit cc91d61

Please sign in to comment.