<commit_before>import { Instance } from "types/instance";

function labelPlugin() {
  return function(fp: Instance) {
    return {
      onReady() {
        const id = fp.input.id;
        if (fp.altInput && id) {
          fp.input.removeAttribute("id");
          fp.altInput.id = id;
        }
      },
    };
  };
}

export default labelPlugin;<commit_msg>fixes labelPlugin on mobile (#1066)<commit_after>import { Instance } from "types/instance";

function labelPlugin() {
  return function(fp: Instance) {
    return {
      onReady() {
        const id = fp.input.id;

        if (!id) {
          return;
        }

        if (fp.mobileInput) {
          fp.input.removeAttribute("id");
          fp.mobileInput.id = id;
        } else if (fp.altInput) {
          fp.input.removeAttribute("id");
          fp.altInput.id = id;
        }
      },
    };
  };
}

export default labelPlugin;
{'fraction_non_alphanumeric': 0.13697104677060135, 'fraction_numerical': 0.004454342984409799, 'mean_word_length': 1.9188311688311688, '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': '1067991', 'n_tokens_mistral': 283, 'n_tokens_neox': 279, 'n_words': 57}