@player-ui/metrics-plugin 0.10.4-next.2 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4492,6 +4492,15 @@ var MetricsPlugin = function() {
|
|
|
4492
4492
|
]);
|
|
4493
4493
|
return Parser;
|
|
4494
4494
|
}();
|
|
4495
|
+
function unpackAndPush(item, initial) {
|
|
4496
|
+
if (Array.isArray(item)) {
|
|
4497
|
+
item.forEach(function(i) {
|
|
4498
|
+
unpackAndPush(i, initial);
|
|
4499
|
+
});
|
|
4500
|
+
} else {
|
|
4501
|
+
initial.push(item);
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4495
4504
|
var withContext = function(model) {
|
|
4496
4505
|
return {
|
|
4497
4506
|
get: function(binding, options) {
|
|
@@ -4712,7 +4721,13 @@ var MetricsPlugin = function() {
|
|
|
4712
4721
|
var newValues = resolvedAST.values.map(function(mValue) {
|
|
4713
4722
|
var mTree = _this.computeTree(mValue, rawParentToPassIn, dataChanges, cacheUpdate, resolveOptions, resolvedAST, prevASTMap);
|
|
4714
4723
|
if (mTree.value !== void 0 && mTree.value !== null) {
|
|
4715
|
-
|
|
4724
|
+
if (mValue.type === "async" && mValue.flatten && mTree.value.asset && Array.isArray(mTree.value.asset.values)) {
|
|
4725
|
+
mTree.value.asset.values.forEach(function(v) {
|
|
4726
|
+
unpackAndPush(v, childValue);
|
|
4727
|
+
});
|
|
4728
|
+
} else {
|
|
4729
|
+
childValue.push(mTree.value);
|
|
4730
|
+
}
|
|
4716
4731
|
}
|
|
4717
4732
|
mTree.dependencies.forEach(function(bindingDep) {
|
|
4718
4733
|
return childDependencies.add(bindingDep);
|