Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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