Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Use ES5 in the JS, because the core build tools barf on let and const. #127

Merged
merged 1 commit into from
May 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions js/wp-autoupdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
'click',
'.toggle-auto-update',
function( event ) {
let data, asset, type;
const $anchor = $( this ),
var data, asset, type,
$anchor = $( this ),
action = $anchor.attr( 'data-wp-action' ),
$label = $anchor.find( '.label' ),
$parent = $anchor.parents(
Expand Down Expand Up @@ -56,13 +56,13 @@
action: 'toggle-auto-updates',
_ajax_nonce: settings.ajax_nonce,
state: action,
type,
asset,
type: type,
asset: asset,
};

$.post( window.ajaxurl, data )
.done( function( response ) {
let $enabled, $disabled, enabledNumber, disabledNumber, errorMessage;
var $enabled, $disabled, enabledNumber, disabledNumber, errorMessage;

if ( response.success ) {
// Update the counts in the enabled/disabled views if on on
Expand Down