Skip to content
Snippets Groups Projects

Issue #3475849 by mably: Drupal 11 compatible version

Files
5
@@ -3,14 +3,12 @@
@@ -3,14 +3,12 @@
* Trigger page reloading from Drupal backend.
* Trigger page reloading from Drupal backend.
*/
*/
(function (location) {
(() => {
'use strict';
Drupal.AjaxCommands.prototype.pageReload = () => {
Drupal.AjaxCommands.prototype.pageReload = function () {
// Reload the page without possible form resubmit:
// Reload the page without possible form resubmit:
if ( window.history.replaceState ) {
if (window.history.replaceState) {
window.history.replaceState( null, null, window.location.href );
window.history.replaceState(null, null, window.location.href);
}
}
window.location = window.location.href;
window.location = window.location.href;
};
};
})(window.location);
})();
Loading