ocket8888 commented on code in PR #7357:
URL: https://github.com/apache/trafficcontrol/pull/7357#discussion_r1123344971
##########
experimental/traffic-portal/src/app/shared/theme-manager/theme-manager.service.ts:
##########
@@ -91,10 +91,12 @@ export class ThemeManagerService {
* @param theme Theme to be stored
*/
private storeTheme(theme: Theme): void {
- try {
- window.localStorage.setItem(this.storageKey,
JSON.stringify(theme));
- } catch (e) {
- console.error(`Unable to store theme into local
storage: ${e}`);
+ if(typeof(window) !== "undefined") {
Review Comment:
We need to be injecting the `Window` token into this service. But you don't
need to fix that in this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]