Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / misc / dialog / dialog.jquery-ui.es6.js
index f30489b28da237cdb5c7664a33aa6faffa3f3529..de1140551a8b3d5d08d0b50df4faec2b6391542e 100644 (file)
@@ -3,7 +3,7 @@
  * Adds default classes to buttons for styling purposes.
  */
 
-(function ($) {
+(function($) {
   $.widget('ui.dialog', $.ui.dialog, {
     options: {
       buttonClass: 'button',
     _createButtons() {
       const opts = this.options;
       let primaryIndex;
-      let $buttons;
       let index;
       const il = opts.buttons.length;
       for (index = 0; index < il; index++) {
-        if (opts.buttons[index].primary && opts.buttons[index].primary === true) {
+        if (
+          opts.buttons[index].primary &&
+          opts.buttons[index].primary === true
+        ) {
           primaryIndex = index;
           delete opts.buttons[index].primary;
           break;
         }
       }
       this._super();
-      $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
+      const $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
       if (typeof primaryIndex !== 'undefined') {
         $buttons.eq(index).addClass(opts.buttonPrimaryClass);
       }
     },
   });
-}(jQuery));
+})(jQuery);