зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1720171 - Ensure ga.getAll().filter exists in SmartBlock Google Analytics shim. r=twisniewski,webcompat-reviewers
The original GA code returns an Array for ga.getAll(), while the shim was returning an Iterator. This caused code that relied on ga.getAll().filter(..) to break with the shim. This patch wraps the Iterator contents back into an Array. Differential Revision: https://phabricator.services.mozilla.com/D119737
This commit is contained in:
Родитель
b81b2affb2
Коммит
ebcf08cd70
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Web Compatibility Interventions",
|
||||
"description": "Urgent post-release fixes for web compatibility.",
|
||||
"version": "24.1.0",
|
||||
"version": "24.2.0",
|
||||
|
||||
"applications": {
|
||||
"gecko": {
|
||||
|
|
|
@ -140,7 +140,7 @@ if (window[window.GoogleAnalyticsObject || "ga"]?.loaded === undefined) {
|
|||
|
||||
Object.assign(ga, {
|
||||
create: (a, b, c, d) => ga("create", a, b, c, d),
|
||||
getAll: () => trackers.values(),
|
||||
getAll: () => Array.from(trackers.values()),
|
||||
getByName: name => trackers.get(name),
|
||||
loaded: true,
|
||||
remove: t => ga("remove", t),
|
||||
|
|
Загрузка…
Ссылка в новой задаче