<commit_before>import Ember from 'ember';
import layout from '../templates/components/recognizes-single-and-double-tap';
import RecognizerMixin from 'ember-gestures/mixins/recognizers';

export default Ember.Component.extend(RecognizerMixin, {
  layout: layout,
  recognizers: 'tap double-tap',
  sawSingle: false,
  sawDouble: false,

  tap() {
    this.set('sawSingle', true);
    Ember.run.later, this, this.reset, 1000
  },

  doubleTap() {
    this.set('sawDouble', true);
    Ember.run.later, this, this.reset, 1000
  },

  reset() {
    this.set('sawSingle', false);
    this.set('sawDouble', false);
  }
});
<commit_msg>only reset if not destroyed<commit_after>import Ember from 'ember';
import layout from '../templates/components/recognizes-single-and-double-tap';
import RecognizerMixin from 'ember-gestures/mixins/recognizers';

export default Ember.Component.extend(RecognizerMixin, {
  layout: layout,
  recognizers: 'tap double-tap',
  sawSingle: false,
  sawDouble: false,

  tap() {
    this.set('sawSingle', true);
    Ember.run.later, this, this.reset, 1000
  },

  doubleTap() {
    this.set('sawDouble', true);
    Ember.run.later, this, this.reset, 1000
  },

  reset() {
    if (!this.get('isDestroyed')) {
      this.set('sawSingle', false);
      this.set('sawDouble', false);
    }
  }
});

{'fraction_non_alphanumeric': 0.15501519756838905, 'fraction_numerical': 0.0121580547112462, 'mean_word_length': 3.8777777777777778, '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': '1889033', 'n_tokens_mistral': 479, 'n_tokens_neox': 436, 'n_words': 92}