Skip to content

Commit

Permalink
fix querySelectorAll issue in form handler and destroy method
Browse files Browse the repository at this point in the history
  • Loading branch information
gmrchk committed Jan 7, 2019
1 parent 609b045 commit 34485e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions dist/swup.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ var _log = __webpack_require__(25);

var _log2 = _interopRequireDefault(_log);

var _utils = __webpack_require__(0);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Expand Down Expand Up @@ -546,7 +548,7 @@ var Swup = function () {
this.cache.empty();

// remove swup data atributes from blocks
document.querySelectorAll('[data-swup]').forEach(function (element) {
(0, _utils.queryAll)('[data-swup]').forEach(function (element) {
delete element.dataset.swup;
});

Expand Down Expand Up @@ -680,7 +682,7 @@ var Swup = function () {
} else {
// create base url
var url = link.getAddress() || window.location.href;
var inputs = form.querySelectorAll('input, select');
var inputs = (0, _utils.queryAll)('input, select', form);
if (url.indexOf('?') == -1) {
url += "?";
} else {
Expand Down
Loading

0 comments on commit 34485e7

Please sign in to comment.