Commit e053f5d3 authored by Ryan Diehl's avatar Ryan Diehl

appease the linter

parent 295d009c
Pipeline #96281 passed with stages
in 5 minutes and 11 seconds
import { APP_BASE_HREF } from '@angular/common';
import { Injectable, Injector } from '@angular/core';
import { Logger } from '@psu/utils/logger';
import { CookieOptions } from './cookie-options.model';
import { isBlank, isString, mergeOptions, safeDecodeURIComponent, safeJsonParse } from './utils';
......@@ -192,9 +193,12 @@ export class CookieService implements ICookieService {
// - 4096 bytes per cookie
const cookieLength = str.length + 1;
if (cookieLength > 4096) {
console.log(
`Cookie \'${name}\' possibly not set or overflowed because it was too large (${cookieLength} > 4096 bytes)!`
);
const logger = this.injector.get<Logger>(Logger);
if (logger) {
logger.log(
`Cookie \'${name}\' possibly not set or overflowed because it was too large (${cookieLength} > 4096 bytes)!`
);
}
}
return str;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment