Skip to content

Commit

Permalink
Merge pull request #3668 from daguiler/bugfix/DNN-36093
Browse files Browse the repository at this point in the history
Fixed portal alias update on website change
  • Loading branch information
mitchelsellers authored Apr 9, 2020
2 parents 2419c3b + a1eb325 commit deee5cf
Showing 1 changed file with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,11 @@ class SiteAliasesPanel extends Component {

loadData() {
const {props} = this;
if (props.siteAliases) {
if (props.portalId === undefined || props.siteAliases.PortalId === props.portalId) {
return false;
}
else {
return true;
}
}
else {
return true;
}
props.dispatch(SiteBehaviorActions.getSiteAliases(props.portalId));
}

componentDidMount() {
const {props} = this;

if (!this.loadData()) {
return;
}
props.dispatch(SiteBehaviorActions.getSiteAliases(props.portalId));
this.loadData();
}

componentDidUpdate(prevProps) {
Expand All @@ -59,6 +44,11 @@ class SiteAliasesPanel extends Component {
tableFields.push({ "name": resx.get("Primary.Header"), "id": "Primary" });
}
this.setState({tableFields});

if (!props.siteAliases ||
props.portalId !== undefined && props.siteAliases.PortalId !== props.portalId) {
this.loadData();
}
}
}

Expand Down

0 comments on commit deee5cf

Please sign in to comment.