From b38714f9adefb5ff1d9a33c063a3a3d59d5e870c Mon Sep 17 00:00:00 2001 From: madalingorbanescu Date: Wed, 3 Mar 2021 11:57:27 +0200 Subject: [PATCH] Improve compatibility with WordPress 5.7 --- assets/js/main.js | 4 ++-- gulpfile.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index d39ccd8..42f2532 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -61,7 +61,7 @@ } }); - $(window).load(function() { + $(window).on('load', function() { $('body').addClass('is--loaded'); $('.menu-close').appendTo('.primary-menu'); cloneSocialMenu(); @@ -275,4 +275,4 @@ })(jQuery); -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/gulpfile.js b/gulpfile.js index 95479be..ca526be 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -94,7 +94,7 @@ gulp.task( 'styles', stylesSequence ); */ function scripts() { - return gulp.src(jsFiles) + return gulp.src(jsFiles, { allowEmpty: true }) .pipe(plugins.concat('main.js')) .pipe(plugins.beautify({indentSize: 2})) .pipe(gulp.dest('./assets/js/', {"mode": "0644"}));