import kebabCase from 'lodash/kebabCase';

export default function getElementType(defaultEl = 'div') {
  const tag = this.$vnode && this.$vnode.data.tag;
  if (!tag) return defaultEl;

  const context = this.$vnode.context;
  const entry = Object
    .entries(context.$options.components || {})
    .find(([name]) => kebabCase(name) === tag);

  if (entry) {
    return entry[1];
  }

  return tag;
}

@@ -157,16 +157,39 @@
 if (!tag
+ %7C%7C tag === 'component'
 ) return

Add special case for dynamic components (#212)