<commit_before>(function(window){
  var vm = window;
  vm.addTodo = addTodo;

  var modal = document.getElementById('customModal');
  vm.onload = function() {
    /////
  }

  function addTodo (event) {
    event.preventDefault();

    if(localStorage.todos) {
      todos = JSON.parse(localStorage.getItem("todos"));
    }else {
      todos = [];
    }

    var title = document.getElementById('title').value;
    var description = document.getElementById('description').value;

    var todo = {
      id: Math.random().toString(36).substr(2, 9),
      title: title,
      description: description,
      status: false
    }
    //console.log(todos);
    todos.push(todo);
    localStorage.setItem('todos', JSON.stringify(todos));
    var myForm = document.getElementsByName('add_todo')[0];
    myForm.reset();
    modal.style.display = "none";<commit_msg>modal issue solved<commit_after>(function(window){
  var vm = window;
  vm.addTodo = addTodo;

  var modal = document.getElementById('addModal');
  vm.onload = function() {
    /////
  }

  function addTodo (event) {
    event.preventDefault();

    if(localStorage.todos) {
      todos = JSON.parse(localStorage.getItem("todos"));
    }else {
      todos = [];
    }

    var title = document.getElementById('title').value;
    var description = document.getElementById('description').value;

    var todo = {
      id: Math.random().toString(36).substr(2, 9),
      title: title,
      description: description,
      status: false
    }
    //console.log(todos);
    todos.push(todo);
    localStorage.setItem('todos', JSON.stringify(todos));
    var myForm = document.getElementsByName('add_todo')[0];
    myForm.reset();
    modal.style.display = "none";
{'fraction_non_alphanumeric': 0.155011655011655, 'fraction_numerical': 0.005827505827505828, 'mean_word_length': 3.0783847980997625, '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': '7343586', 'n_tokens_mistral': 549, 'n_tokens_neox': 552, 'n_words': 95}