<commit_before>import Vue from 'vue'

export default {
    name: 'BSlotComponent',
    props: {
        component: {
            type: Object,
            required: true
        },
        name: {
            type: String,
            default: 'default'
        },
        tag: {
            type: String,
            default: 'div'
        },
        event: {
            type: String,
            default: 'updated'
        }
    },
    methods: {
        refresh() {
            this.$forceUpdate()
        },
        isVueComponent() {
            return this.component instanceof Vue
        }
    },
    created() {
        if (this.isVueComponent()) {
            this.component.$on(this.event, this.refresh)
        }
    },
    beforeDestroy() {
        if (this.isVueComponent()) {
            this.component.$off(this.event, this.refresh)
        }
    },
    render(h) {
        if (this.isVueComponent()) {
            const slots = this.component.$slots[this.name]
            return h(this.tag, {}, slots)
        }
    }
}<commit_msg>Fix check component to SlotComponent<commit_after>export default {
    name: 'BSlotComponent',
    props: {
        component: {
            type: Object,
            required: true
        },
        name: {
            type: String,
            default: 'default'
        },
        tag: {
            type: String,
            default: 'div'
        },
        event: {
            type: String,
            default: 'updated'
        }
    },
    methods: {
        refresh() {
            this.$forceUpdate()
        },
        isVueComponent() {
            return this.component && this.component._isVue
        }
    },
    created() {
        if (this.isVueComponent()) {
            this.component.$on(this.event, this.refresh)
        }
    },
    beforeDestroy() {
        if (this.isVueComponent()) {
            this.component.$off(this.event, this.refresh)
        }
    },
    render(h) {
        if (this.isVueComponent()) {
            const slots = this.component.$slots[this.name]
            return h(this.tag, {}, slots)
        }
    }
}
{'fraction_non_alphanumeric': 0.12511848341232226, 'fraction_numerical': 0.0, 'mean_word_length': 1.2846320346320346, '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': '3486036', 'n_tokens_mistral': 595, 'n_tokens_neox': 593, 'n_words': 111}