More de-overloading of 'terms'

Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
David Baker 2019-07-10 14:28:45 +01:00 committed by GitHub
parent 6fafd208a8
commit c2977ddd8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ export async function startTermsFlow(services, interactionCallback) {
// (one URL may be used for multiple services)
// Not a particularly efficient loop but probably fine given the numbers involved
const urlsForService = agreedUrls.filter((url) => {
for (const terms of Object.values(termsAndService.terms)) {
for (const policy of Object.values(policiesAndService)) {
for (const lang of Object.keys(terms)) {
if (lang === 'version') continue;
if (terms[lang].url === url) return true;