MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / guardComponent

Function guardComponent

06.Router/basic/js/vue-router.js:2666–2676  ·  view source on GitHub ↗
(path, handler)

Source from the content-addressed store, hash-verified

2664 })();
2665
2666 function guardComponent(path, handler) {
2667 var comp = handler.component;
2668 if (Vue.util.isPlainObject(comp)) {
2669 comp = handler.component = Vue.extend(comp);
2670 }
2671 /* istanbul ignore if */
2672 if (typeof comp !== 'function') {
2673 handler.component = null;
2674 warn$1('invalid component for route "' + path + '".');
2675 }
2676 }
2677
2678 /* Installation */
2679

Callers 1

vue-router.jsFile · 0.85

Calls 1

warn$1Function · 0.85

Tested by

no test coverage detected