Skip to content

Commit

Permalink
fix code issues
Browse files Browse the repository at this point in the history
  • Loading branch information
clemiller committed Jul 24, 2024
1 parent a8c9105 commit 426ce27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion nav-app/src/app/tabs/tabs.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { MatTabsModule } from "@angular/material/tabs";
import { ConfigService } from "../services/config.service";
import * as MockData from '../../tests/utils/mock-data';
import * as MockLayers from '../../tests/utils/mock-layers';
import * as is from 'is_js';
import { of } from "rxjs";
import { ChangelogComponent } from "../changelog/changelog.component";
import { HelpComponent } from "../help/help.component";
Expand Down
6 changes: 3 additions & 3 deletions nav-app/src/app/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export function isIE(): boolean {
export function isSafari(compRange): boolean {
function compare(version, comp) {
let str = (comp + '');
let n = +(str.match(/\d+/) || NaN);
let op = str.match(/^[<>]=?|/)[0];
return comparatorFn[op] ? comparatorFn[op](version, n) : (version == n || n !== n);
let n = +(/\d+/.exec(str) || NaN);
let op = /^[<>]=?|/.exec(str)[0];
return comparatorFn[op] ? comparatorFn[op](version, n) : (version == n || Number.isNaN(n));
}

const browser = detect();
Expand Down

0 comments on commit 426ce27

Please sign in to comment.