diff --git a/Core/view/base/web/my/string.js b/Core/view/base/web/my/string.js index 508633522..1998beade 100644 --- a/Core/view/base/web/my/string.js +++ b/Core/view/base/web/my/string.js @@ -40,16 +40,12 @@ define(['df-lodash', 'df-uniform', 'jquery'], function(_, uniform, $) {return { * @returns {Number} */ hash: function(s) { - /** @type {Number} */ - var result = 0; - if (s.length) { - /** @type {Number} */ - var i; - /** @type {Number} */ - var len; + /** @type {Number} */ var result = 0; + if (s) { + /** @type {Number} */ var i; + /** @type {Number} */ var len; for (i = 0, len = s.length; i < len; i++) { - /** @type {Number} */ - var chr = s.charCodeAt (i); + /** @type {Number} */ var chr = s.charCodeAt (i); result = ((result << 5) - result) + chr; result |= 0; // Convert to 32bit integer } diff --git a/Framework/view/adminhtml/web/formElement/select2/main.js b/Framework/view/adminhtml/web/formElement/select2/main.js index f42cfa3b6..45ebd3826 100644 --- a/Framework/view/adminhtml/web/formElement/select2/main.js +++ b/Framework/view/adminhtml/web/formElement/select2/main.js @@ -31,13 +31,11 @@ define(['df', 'jquery', 'Df_Core/Select2', 'domReady!'], function(df, $) {return * внизу страницы. */ ,dropdownCssClass: config.cssClass - // 2016-08-10 - // Скрываем поле поиска: http://stackoverflow.com/a/17649822 + // 2016-08-10 Скрываем поле поиска: http://stackoverflow.com/a/17649822 ,minimumResultsForSearch: -1 }); - if (config.value && config.value.length) { - // http://stackoverflow.com/a/30477163 - $element.val(config.value).change(); + if (config.value) { + $element.val(config.value).change(); // http://stackoverflow.com/a/30477163 } // 2016-08-10 // http://stackoverflow.com/a/32692811 diff --git a/Payment/view/frontend/web/mixin.js b/Payment/view/frontend/web/mixin.js index 40a0a198b..9663f88b6 100644 --- a/Payment/view/frontend/web/mixin.js +++ b/Payment/view/frontend/web/mixin.js @@ -158,8 +158,7 @@ return { dfForm: function(selector) { if (df.u(this._dfForm)) { var result = $('form.' + this.domPrefix()); - // 2016-08-17 - // Если метод вызван до отрисовки шаблона формы, то форма будет отсутствовать. + // 2016-08-17 Если метод вызван до отрисовки шаблона формы, то форма будет отсутствовать. if (result.length) { this._dfForm = result; } diff --git a/Ui/view/base/web/js/grid/columns/select.js b/Ui/view/base/web/js/grid/columns/select.js index ae5960dee..0244a3859 100644 --- a/Ui/view/base/web/js/grid/columns/select.js +++ b/Ui/view/base/web/js/grid/columns/select.js @@ -29,8 +29,5 @@ return Column.extend ({ * @param {Object} record * @returns {String} */ - getLabel: function(record) { - var result = this._super(); /** @type {String} */ - return result.length ? result : record[this.index]; - } + getLabel: function(record) {return this._super() || record[this.index];} });}); diff --git a/composer.json b/composer.json index 0ca74e414..bac5d7048 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/core" - ,"version": "2.11.25" + ,"version": "2.11.26" ,"description": "Mage2.PRO core package." ,"type": "magento2-module" ,"homepage": "https://mage2.pro"