Skip to content

Commit

Permalink
SwG Release 0.1.22.199 (#37310)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmicedcoffee authored Jan 6, 2022
1 parent da7957f commit 39e78c1
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 86 deletions.
20 changes: 9 additions & 11 deletions third_party/subscriptions-project/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Version: 0.1.22.197 */
/** Version: 0.1.22.199 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down Expand Up @@ -747,20 +747,18 @@ class TypeChecker {
}

/**
* @param {Array<?string>} typeArray
* @param {!Array<?string>} typeArray
* @param {Array<string>} expectedTypes
* @return {boolean}
*/
checkArray(typeArray, expectedTypes) {
let found = false;
typeArray.forEach((candidateType) => {
found =
found ||
expectedTypes.includes(
candidateType.replace(/^http:\/\/schema.org\//i, '')
);
});
return found;
for (const schemaTypeUrl of typeArray) {
const schemaType = schemaTypeUrl.replace(/^http:\/\/schema.org\//i, '');
if (expectedTypes.includes(schemaType)) {
return true;
}
}
return false;
}

/*
Expand Down
6 changes: 3 additions & 3 deletions third_party/subscriptions-project/swg-gaa.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Version: 0.1.22.197 */
/** Version: 0.1.22.199 */
/**
* Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.
*
Expand Down Expand Up @@ -1893,14 +1893,14 @@ function logEvent({analyticsEvent, showcaseEvent, isFromUserAction} = {}) {
: [analyticsEvent];

// Log each analytics event.
eventTypes.forEach((eventType) => {
for (const eventType of eventTypes) {
eventManager.logEvent({
eventType,
eventOriginator: EventOriginator.SWG_CLIENT,
isFromUserAction,
additionalParameters: null,
});
});
}
});
});
}
Expand Down
Loading

0 comments on commit 39e78c1

Please sign in to comment.