Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Refactor Iterable To Array Limit Function in az-select-menu.js" #3087

Closed
7 tasks
trackleft opened this issue Jan 12, 2024 · 0 comments · Fixed by #3603
Closed
7 tasks

"Refactor Iterable To Array Limit Function in az-select-menu.js" #3087

trackleft opened this issue Jan 12, 2024 · 0 comments · Fixed by #3603
Labels
good first issue Good for newcomers task Work that doesn't always require a pull request.

Comments

@trackleft
Copy link
Member

trackleft commented Jan 12, 2024

Description

During the process of transpiling JavaScript for another module, an issue was identified in the az-select-menu.js file. It is essential to address this issue separately to avoid including these changes in the pull request (PR) for the other module.

Context

  • Encountered this issue while transpiling JavaScript for a different module.

Conditions of satisfaction

  • clone this repo, navigate to the repo via the cli, and run lando start
  • lando yarn run build
  • git add modules/custom/az_select_menu/js/az-select-menu.js
  • git commit -m "rebuild az-select-menu.js" with build tools lando yarn run build`
  • The JavaScript file az-select-menu.js should be updated with the necessary changes.
  • The changes should not break any existing functionalities.
  • All tests related to this module should pass after the changes.

Updates needed

These are made automatically using the build tools.

diff --git a/modules/custom/az_select_menu/js/az-select-menu.js b/modules/custom/az_select_menu/js/az-select-menu.js
index 73bfae94..b0062380 100644
--- a/modules/custom/az_select_menu/js/az-select-menu.js
+++ b/modules/custom/az_select_menu/js/az-select-menu.js
@@ -8,7 +8,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
-function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
+function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
 (function ($, Drupal, window, document, once) {
   Drupal.azSelectMenu = Drupal.azSelectMenu || {};

@trackleft trackleft transferred this issue from az-digital/arizona-bootstrap Jan 12, 2024
@trackleft trackleft added task Work that doesn't always require a pull request. good first issue Good for newcomers labels Jan 12, 2024
@maine-inventor maine-inventor self-assigned this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers task Work that doesn't always require a pull request.
Projects
None yet
2 participants