Skip to content

Commit

Permalink
fix(maps.route.js): use max place inputs allowed declared on app-conf…
Browse files Browse the repository at this point in the history
…ig.js

Replace a hard-coded value by the max place inputs declared on app-config.js

fix #163
  • Loading branch information
amoncaldas committed Jul 22, 2021
1 parent baaa07b commit d934e2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/maps/maps.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import store from '@/store/store'
import RoutesResolver from '@/support/routes-resolver'
import constants from '@/resources/constants'
import RouteUtils from '@/support/route-utils'
import appConfig from '@/config/app-config'

const rootPath = RoutesResolver.homeUrl()
const placePath = RoutesResolver.place()
Expand All @@ -13,7 +14,7 @@ const embedParameters = '/:embed?/:locale?'

// Build the optional placesNames Path
var optionalPlaceNamesPath = ''
for (let index = 2; index <= 15; index++) {
for (let index = 2; index <= appConfig.maxPlaceInputs; index++) {
optionalPlaceNamesPath += `/:placeName${index}?`
}

Expand Down

0 comments on commit d934e2b

Please sign in to comment.