<commit_before>/*
 * Start screen directive.
 *
 * Shows the steps to the user.
 */
angular.module('avBooth')
  .directive('avbStartScreen',  function(ConfigService) {

    function link(scope, element, attrs) {
        scope.tosTitle = ConfigService.tos.title;
        scope.tosText = ConfigService.tos.text;
        scope.extra_data = {};
        scope.legal = false;
        if (attrs.extra !== undefined) {
            scope.extra_data = JSON.parse(attrs.extra);
            var d = scope.extra_data;
            if (d.name && d.org && d.nif && d.contact) {
                scope.legal = true;
            }
        }
    }

    return {
      restrict: 'AE',
      scope: true,
      link: link,
      templateUrl: 'avBooth/start-screen-directive/start-screen-directive.html'
    };
  });<commit_msg>Fixed extra_data when it's ""<commit_after>/*
 * Start screen directive.
 *
 * Shows the steps to the user.
 */
angular.module('avBooth')
  .directive('avbStartScreen',  function(ConfigService) {

    function link(scope, element, attrs) {
        scope.tosTitle = ConfigService.tos.title;
        scope.tosText = ConfigService.tos.text;
        scope.extra_data = {};
        scope.legal = false;
        if (attrs.extra && typeof attrs.extra === 'string') {
            scope.extra_data = JSON.parse(attrs.extra);
            var d = scope.extra_data;
            if (d.name && d.org && d.nif && d.contact) {
                scope.legal = true;
            }
        }
    }

    return {
      restrict: 'AE',
      scope: true,
      link: link,
      templateUrl: 'avBooth/start-screen-directive/start-screen-directive.html'
    };
  });
{'fraction_non_alphanumeric': 0.13600485731633272, 'fraction_numerical': 0.0, 'mean_word_length': 2.034990791896869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '933102', 'n_tokens_mistral': 513, 'n_tokens_neox': 516, 'n_words': 102}