<commit_before>import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';

var SignoutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
    classNames: ['ghost-signout'],

    afterModel: function (model, transition) {
        if (Ember.canInvoke(transition, 'send')) {
            transition.send('invalidateSession');
            transition.abort();
            this.transitionTo('signin');
        } else {
            this.send('invalidateSession');
            this.transitionTo('signin');
        }
    }
});

export default SignoutRoute;<commit_msg>Properly remove email notification on signout.<commit_after>import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';

var SignoutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
    classNames: ['ghost-signout'],

    afterModel: function (model, transition) {
        this.notifications.clear();
        if (Ember.canInvoke(transition, 'send')) {
            transition.send('invalidateSession');
            transition.abort();
            this.transitionTo('signin');
        } else {
            this.send('invalidateSession');
            this.transitionTo('signin');
        }
    }
});

export default SignoutRoute;
{'fraction_non_alphanumeric': 0.12218181818181818, 'fraction_numerical': 0.0, 'mean_word_length': 3.2208588957055215, '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': '2177631', 'n_tokens_mistral': 376, 'n_tokens_neox': 378, 'n_words': 67}