Skip to content

Commit

Permalink
Improved: remove unnecessary template literals(hotwax#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Nov 6, 2024
1 parent b0def40 commit b0867d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/FacilityGeoPointModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ export default defineComponent({
async generateLatLong() {
this.isGeneratingLatLong = true
const postalCode = this.geoPoint.postalCode;
const query = postalCode.startsWith('0') ? `${postalCode} OR ${postalCode.substring(1)}` : `${postalCode}`;
const query = postalCode.startsWith('0') ? postalCode + ' OR ' + postalCode.substring(1) : postalCode;
const payload = {
json: {
params: {
q: `postcode: ${query}`
q: 'postcode: ' + query
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/GeoPointPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export default defineComponent({
try {
const postalCode = this.postalAddress.postalCode;
const query = postalCode.startsWith('0') ? `${postalCode} OR ${postalCode.substring(1)}` : postalCode;
const query = postalCode.startsWith('0') ? postalCode + ' OR ' + postalCode.substring(1) : postalCode;
resp = await UtilService.generateLatLong({
json: {
params: {
q: `postcode: ${query}`
q: 'postcode: ' + query
}
}
})
Expand Down
4 changes: 2 additions & 2 deletions src/views/AddFacilityAddress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ export default defineComponent({
},
async generateLatLong() {
const postalCode = this.formData.postalCode;
const query = postalCode.startsWith('0') ? `${postalCode} OR ${postalCode.substring(1)}` : `${postalCode}`;
const query = postalCode.startsWith('0') ? postalCode + ' OR ' + postalCode.substring(1) : postalCode;
const payload = {
json: {
params: {
q: `postcode: ${query}`
q: 'postcode: ' + query
}
}
}
Expand Down

0 comments on commit b0867d5

Please sign in to comment.