text: import { genClassForVnode, concat, stringifyClass } from 'web/util/index'
  
  function updateClass(oldVnode, vnode) {
    const el = vnode.elm
    const data = vnode.data
    const oldData = oldVnode.data
    if (
      !data.staticClass &&
      !data.class &&
      (!oldData || (!oldData.staticClass && !oldData.class))
    ) {
      return
    }
  
    let cls = genClassForVnode(vnode)
  
    // handle transition classes
    const transitionClass = el._transitionClasses
    if (transitionClass) {
      cls = concat(cls, stringifyClass(transitionClass))
    }
  
    // set the class
    if (cls !== el._prevClass) {
      el.setAttribute('class', cls)
      el._prevClass = cls
    }
  }
  
  export default {
    create: updateClass,
    update: updateClass
  }
  