Would you like to know a more efficient way to streamline this If statement? The variables are all strings and are reused in both conditions, but the outcome varies depending on whether it returns true
or false
.
if(params.province && !params.streetType && !params.streetNr){
this.localityIdCP = params.localityId;
}
if(params.province && params.streetType && !params.streetNr){
this.streetIdCP = params.localityId;
}