<commit_before>/**
 * @param HsMapService
 * @param HsGeolocationService
 * @param HsLayoutService
 */
export default function (HsMapService, HsGeolocationService, HsLayoutService) {
  'ngInject';
  return {
    template: require('./partials/geolocation.html'),
    link: function link(scope, element, attrs) {
      if (HsLayoutService.componentEnabled('geolocationButton')) {
        HsMapService.loaded().then((_) => {
          HsLayoutService.contentWrapper
            .querySelector('.ol-overlaycontainer-stopevent')
            .appendChild(element[0]);
        });
      }
    },
    controller: [
      '$scope',
      'HsConfig',
      function ($scope, config) {
        $scope.locationService = HsGeolocationService;
        $scope.collapsed = true;

        $scope.geolocationVisible = function () {
          return HsLayoutService.componentEnabled('geolocationButton');
        };
      },
    ],
  };
}
<commit_msg>Don't throw error if .ol-overlaycontainer-stopevent cant be found<commit_after>/**
 * @param HsMapService
 * @param HsGeolocationService
 * @param HsLayoutService
 */
export default function (HsMapService, HsGeolocationService, HsLayoutService) {
  'ngInject';
  return {
    template: require('./partials/geolocation.html'),
    link: function link(scope, element, attrs) {
      if (HsLayoutService.componentEnabled('geolocationButton')) {
        HsMapService.loaded().then((_) => {
          const container = HsLayoutService.contentWrapper.querySelector(
            '.ol-overlaycontainer-stopevent'
          );
          if (container) {
            container.appendChild(element[0]);
          }
        });
      }
    },
    controller: [
      '$scope',
      'HsConfig',
      function ($scope, config) {
        $scope.locationService = HsGeolocationService;
        $scope.collapsed = true;

        $scope.geolocationVisible = function () {
          return HsLayoutService.componentEnabled('geolocationButton');
        };
      },
    ],
  };
}

{'fraction_non_alphanumeric': 0.12637913741223672, 'fraction_numerical': 0.0010030090270812437, 'mean_word_length': 2.7012987012987013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4661642', 'n_tokens_mistral': 572, 'n_tokens_neox': 565, 'n_words': 95}