dist/vue.runtime.esm.js
function queueWatcher (watcher) {
  var id = watcher.id;
  if (has[id] == null) {
    has[id] = true;
    if (!flushing) {
      queue.push(watcher);
    } else {
      // if already flushing, splice the watcher based on its id
      // if already past its id, it will be run next immediately.
      var i = queue.length - 1;
      while (i > index && queue[i].id > watcher.id) {
        i--;
      }
      queue.splice(i + 1, 0, watcher);
    }
    // queue the flush
    if (!waiting) {
      waiting = true;

      if (process.env.NODE_ENV !== 'production' && !config.async) {
        flushSchedulerQueue();
        return
      }
      nextTick(flushSchedulerQueue);
    }
  }
}
function queueWatcher (watcher) {
  var id = watcher.id;
  if (has[id] == null) {
    has[id] = true;
    if (!flushing) {
      queue.push(watcher);
    } else {
      // if already flushing, splice the watcher based on its id
      // if already past its id, it will be run next immediately.
      var i = queue.length - 1;
      while (i > index && queue[i].id > watcher.id) {
        i--;
      }
      queue.splice(i + 1, 0, watcher);
    }
    // queue the flush
    if (!waiting) {
      waiting = true;

      if (process.env.NODE_ENV !== 'production' && !config.async) {
        flushSchedulerQueue();
        return
      }
      nextTick(flushSchedulerQueue);
    }
  }
}
function queueWatcher ( watcher ) { var id = watcher . id ; if ( has [ id ] == null ) { has [ id ] = true ; if ( ! flushing ) { queue . push ( watcher ) ; } else { // if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. var i = queue . length - 1 ; while ( i > index && queue [ i ] . id > watcher . id ) { i -- ; } queue . splice ( i + 1 , 0 , watcher ) ; } // queue the flush if ( ! waiting ) { waiting = true ; if ( process . env . NODE_ENV !== 'production' && ! config . async ) { flushSchedulerQueue ( ) ; return } nextTick ( flushSchedulerQueue ) ; } } }
Push a watcher into the watcher queue.
Jobs with duplicate IDs will be skipped unless it's
pushed when the queue is being flushed.
Push a watcher into the watcher queue . Jobs with duplicate IDs will be skipped unless it s pushed when the queue is being flushed .