Skip to content

Commit 92d820c

Browse files
committed
Removed error message when there are no elements inside the component for AJAX compatibility
1 parent 80c39fa commit 92d820c

File tree

3 files changed

+1617
-14
lines changed

3 files changed

+1617
-14
lines changed

dist/vue-scrollactive.js

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ exports.default = Plugin;
423423
/* 24 */
424424
/***/ (function(module, exports, __webpack_require__) {
425425

426+
var disposed = false
426427
var Component = __webpack_require__(25)(
427428
/* script */
428429
__webpack_require__(26),
@@ -435,6 +436,25 @@ var Component = __webpack_require__(25)(
435436
/* moduleIdentifier (server only) */
436437
null
437438
)
439+
Component.options.__file = "/Users/mauricio/web/vue-scrollactive/src/scrollactive.vue"
440+
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
441+
if (Component.options.functional) {console.error("[vue-loader] scrollactive.vue: functional components are not supported with templates, they should use render functions.")}
442+
443+
/* hot reload */
444+
if (false) {(function () {
445+
var hotAPI = require("vue-hot-reload-api")
446+
hotAPI.install(require("vue"), false)
447+
if (!hotAPI.compatible) return
448+
module.hot.accept()
449+
if (!module.hot.data) {
450+
hotAPI.createRecord("data-v-75a6c496", Component.options)
451+
} else {
452+
hotAPI.reload("data-v-75a6c496", Component.options)
453+
}
454+
module.hot.dispose(function (data) {
455+
disposed = true
456+
})
457+
})()}
438458

439459
module.exports = Component.exports
440460

@@ -710,16 +730,12 @@ exports.default = {
710730

711731

712732
/**
713-
* Sets the initial list of menu items, validating if there's none
714-
* or if its hash corresponds to a valid element ID.
733+
* Sets the initial list of menu items, validating if its hash
734+
* corresponds to a valid element ID.
715735
*/
716736
setScrollactiveItems: function setScrollactiveItems() {
717737
var scrollactiveItems = document.querySelectorAll('.scrollactive-item');
718738

719-
if (scrollactiveItems.length < 1) {
720-
throw new Error("You must give your menu items a class of 'scrollactive-item' in order to track them.");
721-
}
722-
723739
var _iteratorNormalCompletion2 = true;
724740
var _didIteratorError2 = false;
725741
var _iteratorError2 = undefined;
@@ -1549,13 +1565,20 @@ module.exports = function bezier (mX1, mY1, mX2, mY2) {
15491565

15501566
/***/ }),
15511567
/* 58 */
1552-
/***/ (function(module, exports) {
1568+
/***/ (function(module, exports, __webpack_require__) {
15531569

15541570
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
15551571
return _c('nav', {
15561572
staticClass: "scrollactive-nav"
15571573
}, [_vm._t("default")], 2)
15581574
},staticRenderFns: []}
1575+
module.exports.render._withStripped = true
1576+
if (false) {
1577+
module.hot.accept()
1578+
if (module.hot.data) {
1579+
require("vue-hot-reload-api").rerender("data-v-75a6c496", module.exports)
1580+
}
1581+
}
15591582

15601583
/***/ })
15611584
/******/ ]);

0 commit comments

Comments
 (0)