зеркало из https://github.com/mozilla/glean.js.git
Bug 1855792 - only set window.Glean vars in browser
This commit is contained in:
Родитель
b592b1803d
Коммит
d662041345
|
@ -2,6 +2,8 @@
|
|||
|
||||
[Full changelog](https://github.com/mozilla/glean.js/compare/v2.0.3...main)
|
||||
|
||||
* [#1772](https://github.com/mozilla/glean.js/pull/1772): Fix bug where `window.Glean` functions were getting set on non-browser properties.
|
||||
|
||||
# v2.0.3 (2023-09-27)
|
||||
|
||||
[Full changelog](https://github.com/mozilla/glean.js/compare/v2.0.2...v2.0.3)
|
||||
|
|
|
@ -445,10 +445,13 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
window.Glean = {
|
||||
setLogPings: Glean.setLogPings,
|
||||
setDebugViewTag: Glean.setDebugViewTag,
|
||||
setSourceTags: Glean.setSourceTags
|
||||
};
|
||||
// Only set `Glean` values whenever running inside of a browser.
|
||||
if (typeof window !== "undefined") {
|
||||
window.Glean = {
|
||||
setLogPings: Glean.setLogPings,
|
||||
setDebugViewTag: Glean.setDebugViewTag,
|
||||
setSourceTags: Glean.setSourceTags
|
||||
};
|
||||
}
|
||||
|
||||
export default Glean;
|
||||
|
|
Загрузка…
Ссылка в новой задаче