Why the trailing `.slice(0, -1).join('#')` ?
Couldn't you just do:
`routedActivity.route.split('#')[0]`