demo/bundle.js
/**
             * Flush both queues and run the watchers.
             */
Flush both queues and run the watchers.
Flush both queues and run the watchers .
function flushSchedulerQueue () {
              flushing = true;
              var watcher, id;
              queue$1.sort(function (a, b) { return a.id - b.id; });
              for (index = 0; index < queue$1.length; index++) {
                watcher = queue$1[index];
                id = watcher.id;
                has[id] = null;
                watcher.run();
                if (process.env.NODE_ENV !== 'production' && has[id] != null) {
                  circular[id] = (circular[id] || 0) + 1;
                  if (circular[id] > MAX_UPDATE_COUNT) {
                    warn(
                      'You may have an infinite update loop ' + (
                        watcher.user
                          ? ("in watcher with expression \"" + (watcher.expression) + "\"")
                          : "in a component render function."
                      ),
                      watcher.vm
                    );
                    break
                  }
                }
              }
              var activatedQueue = activatedChildren.slice();
              var updatedQueue = queue$1.slice();
              resetSchedulerState();
              callActivatedHooks(activatedQueue);
              callUpdatedHooks(updatedQueue);
              if (devtools && config$1.devtools) {
                devtools.emit('flush');
              }
            }
function flushSchedulerQueue ( ) { flushing = true ; var watcher , id ; queue$1 . sort ( function ( a , b ) { return a . id - b . id ; } ) ; for ( index = 0 ; index < queue$1 . length ; index ++ ) { watcher = queue$1 [ index ] ; id = watcher . id ; has [ id ] = null ; watcher . run ( ) ; if ( process . env . NODE_ENV !== 'production' && has [ id ] != null ) { circular [ id ] = ( circular [ id ] || 0 ) + 1 ; if ( circular [ id ] > MAX_UPDATE_COUNT ) { warn ( 'You may have an infinite update loop ' + ( watcher . user ? ( "in watcher with expression \"" + ( watcher . expression ) + "\"" ) : "in a component render function." ) , watcher . vm ) ; break } } } var activatedQueue = activatedChildren . slice ( ) ; var updatedQueue = queue$1 . slice ( ) ; resetSchedulerState ( ) ; callActivatedHooks ( activatedQueue ) ; callUpdatedHooks ( updatedQueue ) ; if ( devtools && config$1 . devtools ) { devtools . emit ( 'flush' ) ; } }
Flush both queues and run the watchers.
Flush both queues and run the watchers .
// Sort queue before flush. // This ensures that: // 1. Components are updated from parent to child. (because parent is always //    created before the child) // 2. A component's user watchers are run before its render watcher (because //    user watchers are created before the render watcher) // 3. If a component is destroyed during a parent component's watcher run, //    its watchers can be skipped. // do not cache length because more watchers might be pushed // as we run existing watchers // in dev build, check and stop circular updates. // keep copies of post queues before resetting state // call component updated and activated hooks // devtool hook /* istanbul ignore if */