Skip to content
Snippets Groups Projects
Commit d1713fba authored by Olga Nakonechna's avatar Olga Nakonechna
Browse files

Merge remote-tracking branch 'remotes/origin/MAGETWO-42575' into PR

parents 857985d6 0ab2be4a
No related merge requests found
...@@ -67,8 +67,13 @@ define([ ...@@ -67,8 +67,13 @@ define([
if (typeof unwrappedArray.length === 'undefined') { // Coerce single value into array if (typeof unwrappedArray.length === 'undefined') { // Coerce single value into array
unwrappedArray = [unwrappedArray]; unwrappedArray = [unwrappedArray];
} }
// Filter out any entries marked as destroyed // Filter out any entries marked as destroyed
filteredArray = ko.utils.arrayFilter(unwrappedArray, function (item) { filteredArray = ko.utils.arrayFilter(unwrappedArray, function (item) {
if (item && !item.label) {
return false;
}
return includeDestroyed || item === undefined || item === null || !ko.utils.unwrapObservable(item._destroy); return includeDestroyed || item === undefined || item === null || !ko.utils.unwrapObservable(item._destroy);
}); });
filteredArray.map(recursivePathBuilder, null); filteredArray.map(recursivePathBuilder, null);
...@@ -211,8 +216,8 @@ define([ ...@@ -211,8 +216,8 @@ define([
// IE6 doesn't like us to assign selection to OPTION nodes before they're added to the document. // IE6 doesn't like us to assign selection to OPTION nodes before they're added to the document.
// That's why we first added them without selection. Now it's time to set the selection. // That's why we first added them without selection. Now it's time to set the selection.
if (previousSelectedValues.length) { if (previousSelectedValues.length) {
var isSelected = ko.utils.arrayIndexOf(previousSelectedValues, ko.selectExtensions.readValue(newOptions[0])) >= 0; var isSelected = ko.utils.arrayIndexOf(previousSelectedValues, ko.selectExtensions.readValue(newOptions.value)) >= 0;
ko.utils.setOptionNodeSelectionState(newOptions[0], isSelected); ko.utils.setOptionNodeSelectionState(newOptions.value, isSelected);
// If this option was changed from being selected during a single-item update, notify the change // If this option was changed from being selected during a single-item update, notify the change
if (itemUpdate && !isSelected) { if (itemUpdate && !isSelected) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment