lint fix
This commit is contained in:
@@ -170,6 +170,7 @@ class WakaTimeCore {
|
||||
if (!contains(url, items.blacklist as string)) {
|
||||
await this.sendHeartbeat(
|
||||
{
|
||||
branch: null,
|
||||
hostname: items.hostname as string,
|
||||
project,
|
||||
url,
|
||||
@@ -189,6 +190,7 @@ class WakaTimeCore {
|
||||
await this.sendHeartbeat(
|
||||
{
|
||||
...heartbeat,
|
||||
branch: null,
|
||||
hostname: items.hostname as string,
|
||||
project: heartbeat.project ?? project,
|
||||
},
|
||||
@@ -340,12 +342,12 @@ class WakaTimeCore {
|
||||
let userAgent;
|
||||
if (IS_FIREFOX) {
|
||||
browserName = 'firefox';
|
||||
userAgent = navigator.userAgent.match(/Firefox\/\S+/g)![0];
|
||||
userAgent = navigator.userAgent.match(/Firefox\/\S+/g)?.[0];
|
||||
} else if (IS_EDGE) {
|
||||
browserName = 'edge';
|
||||
userAgent = navigator.userAgent;
|
||||
} else {
|
||||
userAgent = navigator.userAgent.match(/Chrome\/\S+/g)![0];
|
||||
userAgent = navigator.userAgent.match(/Chrome\/\S+/g)?.[0];
|
||||
}
|
||||
const payload: Record<string, unknown> = {
|
||||
entity: heartbeat.url,
|
||||
|
||||
Reference in New Issue
Block a user