diff --git a/core/modules/shortcut/shortcut.admin.js b/core/modules/shortcut/shortcut.admin.js
index dacae3e..137c7d0 100644
--- a/core/modules/shortcut/shortcut.admin.js
+++ b/core/modules/shortcut/shortcut.admin.js
@@ -33,6 +33,7 @@ Drupal.behaviors.shortcutDrag = {
 
       // Add a handler for when a row is swapped.
       tableDrag.row.prototype.onSwap = function (swappedRow) {
+        var self = this;
         var disabledIndex = table.find('tr').index(table.find('tr.shortcut-status-disabled')) - slots - 2,
           count = 0;
         table.find('tr.shortcut-status-enabled').nextAll(':not(.shortcut-slot-empty)').each(function(index) {
