         token = token.replace /:/g, '' # replace the `:` for correct token name
         params[token] = values[index]  # match token with values
 
-      cb.call this, params, query if cb
+      cb?.call this, params, query
 
 
   ###*

    to match this route `/activity/post/1/comment/2`. Here is the regex101
    https://www.regex101.com/r/wX2kB6/1

    @param {!string} route Actual page route.
    @return {RegExp|undefined} RegExp to match page URL.
  ###

    @historyManager.on 'Navigated', (e) =>
      path = e.data

      unless @latestHandledRoute is path
        @handleRoute_ path
        @latestHandledRoute = path


  ###*
