<commit_before><template>
    <a :is="componentType"
       :active-class="activeClass"
       :disabled="disabled"
       :aria-disabled="disabled ? 'true' : 'false'"
       :to="to"
       :href="href"
       :exact="exact"
       @click="click"
    >
        <slot></slot>
    </a>
</template>

<script>
    export default {
        computed: {
            componentType() {
                return (this.$router && this.to) ? 'router-link' : 'a';
            }
        },
        props: {
            activeClass: {
                type: String,
                default: 'active'
            },
            disabled: {
                type: Boolean,
                default: false
            },
            to: {
                type: [String, Object],
                default: null
            },
            href: {
                type: String,
                default: ''
            },
            exact: {
                type: Boolean,
                default: false
            }
        },
        methods: {
            click(e) {
                if (this.disabled || this.href === '#') {
                    e.preventDefault();
                    e.stopPropagation();
                }

                if (!this.disabled) {
                    this.$emit('click', e);
                    this.$root.$emit('shown::dropdown', this);
                }
            }
        }
    };
</script>
<commit_msg>[link] don't pass default href #331<commit_after><template>
    <a :is="componentType"
       :active-class="activeClass"
       :disabled="disabled"
       :aria-disabled="disabled ? 'true' : 'false'"
       :to="to"
       :exact="exact"
       @click="click"
    >
        <slot></slot>
    </a>
</template>

<script>
    export default {
        computed: {
            componentType() {
                return (this.$router && this.to) ? 'router-link' : 'a';
            }
        },
        props: {
            activeClass: {
                type: String,
                default: 'active'
            },
            disabled: {
                type: Boolean,
                default: false
            },
            to: {
                type: [String, Object],
                default: null
            },
            exact: {
                type: Boolean,
                default: false
            }
        },
        methods: {
            click(e) {
                if (this.disabled || this.href === '#') {
                    e.preventDefault();
                    e.stopPropagation();
                }

                if (!this.disabled) {
                    this.$emit('click', e);
                    this.$root.$emit('shown::dropdown', this);
                }
            }
        }
    };
</script>

{'fraction_non_alphanumeric': 0.13432835820895522, 'fraction_numerical': 0.0010921004732435385, 'mean_word_length': 0.961456102783726, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '4975629', 'n_tokens_mistral': 735, 'n_tokens_neox': 692, 'n_words': 130}